Haxe within Angular2 ts component do I use Shallow copy and demo?

31 views
Skip to first unread message

JLM

unread,
Feb 16, 2017, 12:21:41 PM2/16/17
to Haxe
I have been reading about shallow copy export in Haxe.
https://haxe.org/manual/target-javascript-expose.html

Created some really nice graph components that work well standalone grabbing canvas tag, simplified the relevant html might look like.

<canvas id="pie1" width="500" height="500" data-percent='60'"></canvas>
<script id='graphx' data-pie="[pie1]" src="graphx.js"></script>

but I am not really sure how to how to use that in Angular2 component within a collegues project, are there any plans to have a typescript wrapper module export option for Haxe?

I tried to just dump the js in the components ngOnInit() {} function but it seemed to really upset typescript and Angular removes any script tags in the template.... the js output is not really typescript js friendly :( .

Has anyone documented using Haxe within Typescript especially in large frameworks?  Am using pure haxe js for hxElectron but would be nice to put little Haxe snipits in Angular2 components where fancy Canvas/Webgl is required.  Reading around but not being a typescript or pure js expert feeling a bit lost.


Reply all
Reply to author
Forward
0 new messages