Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understand haxejs-angular app How to write app in OOP(Haxe) and Dependency Injection Way(Angular)?

Similar presentations


Presentation on theme: "Understand haxejs-angular app How to write app in OOP(Haxe) and Dependency Injection Way(Angular)?"— Presentation transcript:

1 Understand haxejs-angular app How to write app in OOP(Haxe) and Dependency Injection Way(Angular)?

2 Package to be angularjs module name 1) They all belong to “test” module 2) Module dependencies will be managed automatically www.haxejs.com2

3 Group components into different classes(files) by type Total 11 types of components: 1)Controller 2)Directive 3)Service 4)Config 5)Run 6)Constant 7)Value 8)Filter 9)Provider 10)Animation 11)Factory www.haxejs.com3

4 Each type class(file) should 1) Implement an interface, like IControllers 2) Has a public static main function 3) Remember to import ng.Angular even your code does not use any of it www.haxejs.com4

5 Every component should use 1)@:inject meta to inject dependencies (it can be empty) 2)Static Dynamic variable name to be the name of your component 3)$scope component is of NgScope type ($->Ng) www.haxejs.com5

6 Component can be a class Like service, controller, provider www.haxejs.com6

7 Component can be a function Like config, run, directive www.haxejs.com7

8 Controller component should extend BaseCtrl class 1)Call super() in new function 2)Camel class name to be the object name inside html code www.haxejs.com8

9 Provider component should extend BaseProvider with get function 1)Invoke service by “xx” name to access what get function returns 2)Config service by “xxProvider” name to call setting functions like “change” www.haxejs.com9


Download ppt "Understand haxejs-angular app How to write app in OOP(Haxe) and Dependency Injection Way(Angular)?"

Similar presentations


Ads by Google