OLD | NEW |
(Empty) | |
| 1 library test_files.main; |
| 2 |
| 3 import 'package:angular/core/annotation_src.dart'; |
| 4 import 'package:angular/routing/module.dart'; |
| 5 import 'package:di/di.dart'; |
| 6 |
| 7 @Decorator( |
| 8 selector:'[ng-if]', |
| 9 map: const {'.': '=>ngIfCondition'}) |
| 10 class NgIfDirective { |
| 11 bool ngIfCondition; |
| 12 } |
| 13 |
| 14 main() { |
| 15 var barRoute = ngRoute( |
| 16 path: '/bar', |
| 17 viewHtml: '<div ng-if="bar"></div>'); |
| 18 var module = new Module() |
| 19 ..value(RouteInitializerFn, (router, views) { |
| 20 views.configure({ |
| 21 'foo': ngRoute( |
| 22 path: '/foo', |
| 23 viewHtml: '<div ng-if="foo"></div>'), |
| 24 'bar': barRoute, |
| 25 }); |
| 26 }); |
| 27 } |
OLD | NEW |