1
votes

How do I use the module, controller and scope in angular dart. I'm trying to using angular dart but i don't know how to use it angular dart. if try to use @Controller it's showing error my angular dart version is 1.0.

 angular.module("users", ['commonerrors']);

How to use this line in AngularDart. i used the class for users and extend the module, how to declare the ['commonerrors'] in that module.

1

1 Answers

1
votes

You may be interesting to look at how it was implemented in Angular Dart UI or look at demo site. I believe you will find answers on many of your questions there.

Angular Dart is not the same as AngularJS version 1.x and it doesn't use angular.module() statements to register new modules. Module registration happens via addModule method of Application class. To create new module you need do the following:

  1. Create class DemoModule extends Module class;
  2. Add dependencies to other modules through install(new AngularUIModule()) method;
  3. Register all components, decorators and other injectable classes in Dependency Injection via method of the same name bind(TooltipDemo)