This repository was archived by the owner on Feb 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Expand file tree Collapse file tree 4 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,13 @@ import 'package:angular/angular.dart';
5
5
@NgComponent (
6
6
selector: 'search-recipe' ,
7
7
templateUrl: 'packages/angular_dart_demo/component/search_recipe_component.html' ,
8
- publishAs: 'ctrl' ,
9
- map: const {
10
- 'name-filter-string' : '<=>nameFilterString' ,
11
- 'category-filter-map' : '<=>categoryFilterMap'
12
- }
8
+ publishAs: 'ctrl'
13
9
)
14
10
class SearchRecipeComponent {
11
+ @NgTwoWay ('name-filter-string' )
15
12
String nameFilterString = "" ;
13
+
14
+ @NgTwoWay ('category-filter-map' )
16
15
Map categoryFilterMap;
17
16
18
17
get categories {
Original file line number Diff line number Diff line change @@ -8,13 +8,12 @@ import 'package:angular/angular.dart';
8
8
templateUrl: 'packages/angular_dart_demo/component/view_recipe_component.html' ,
9
9
cssUrl: 'packages/angular_dart_demo/component/view_recipe_component.css' ,
10
10
publishAs: 'ctrl' ,
11
- map: const {
12
- 'recipe-map' : '<=>recipeMap'
13
- },
14
11
exportExpressions: const ['name' ]
15
12
)
16
13
class ViewRecipeComponent {
14
+ @NgTwoWay ('recipe-map' )
17
15
Map <String , Recipe > recipeMap;
16
+
18
17
String _recipeId;
19
18
20
19
get recipe {
Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ import 'package:angular/angular.dart';
30
30
selector: 'rating' ,
31
31
templateUrl: 'packages/angular_dart_demo/rating/rating_component.html' ,
32
32
cssUrl: 'packages/angular_dart_demo/rating/rating_component.css' ,
33
- publishAs: 'ctrl' ,
34
- map: const {
35
- 'max-rating' : '@maxRating' ,
36
- 'rating' : '<=>rating'
37
- }
33
+ publishAs: 'ctrl'
38
34
)
39
35
class RatingComponent {
40
36
String _starOnChar = "\u 2605" ;
@@ -44,8 +40,10 @@ class RatingComponent {
44
40
45
41
List <int > stars = [];
46
42
43
+ @NgTwoWay ('rating' )
47
44
int rating;
48
45
46
+ @NgAttr ('max-rating' )
49
47
set maxRating (String value) {
50
48
stars = [];
51
49
var count = value == null ? 5 : int .parse (value);
Original file line number Diff line number Diff line change @@ -5,14 +5,13 @@ import 'dart:math';
5
5
import 'package:angular/angular.dart' ;
6
6
7
7
@NgDirective (
8
- selector: '[tooltip]' ,
9
- map: const {
10
- 'tooltip' : '=>displayModel'
11
- }
8
+ selector: '[tooltip]'
12
9
)
13
10
class Tooltip {
14
11
dom.Element element;
15
12
Scope scope;
13
+
14
+ @NgOneWay ('tooltip' )
16
15
TooltipModel displayModel;
17
16
18
17
dom.Element tooltipElem;
You can’t perform that action at this time.
0 commit comments