A small sample on how to use Haxe to give a better structure to an Angular 1.5 app.
It was shown as a practical example of using Haxe targetting JS in a talk I gave at a WDT*[0] gathering in Colima, Mexico.
You can find the slides here (in PDF).
*[0] http://www.webdevtalks.mx/
It uses a forked version of Angular.Haxe, at least until this PR is merged: frabbit/angular.haxe#13.
- Clone this repo ;)
- Install Haxe - follow the instructions for your OS here: http://haxe.org/download/;
- Install the forked version of
angular.haxe
:haxelib git angular.haxe git@github.com:fullofcaffeine/angular.haxe.git
- Install
monsoon
:haxelib install monsoon-embed
- Compile the project:
haxe build.hxml
. This will generate two outputs:bin/app.js
(client) andbin/server.n
(the server) - Start the server:
neko bin/server.n
(NekoVM is part of the Haxe distribution) - You can now point your browser to
localhost:5000
to test the Haxe-powered Angular 1.5 sample app.
If you have any issues or if you have any questions, feel free to ping me on twitter @fullofcaffeine.
Learn more about Haxe -- check the presentation PDF, or go to: http://haxe.org.
Join us on #haxe @ freenode.