Skip to content

Commit 1ab77ae

Browse files
kwalrathmhevery
authored andcommitted
update tutorial to AngularDart v0.10.0
Closes dart-archive#116
1 parent 4fa0896 commit 1ab77ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+140
-1143
lines changed

Chapter_01/pubspec.lock

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ packages:
44
analyzer:
55
description: analyzer
66
source: hosted
7-
version: "0.12.2"
7+
version: "0.13.5"
88
angular:
99
description: angular
1010
source: hosted
11-
version: "0.9.10"
11+
version: "0.10.0"
1212
args:
1313
description: args
1414
source: hosted
1515
version: "0.10.0+2"
1616
barback:
1717
description: barback
1818
source: hosted
19-
version: "0.11.1"
19+
version: "0.12.0"
2020
browser:
2121
description: browser
2222
source: hosted
23-
version: "0.9.1"
23+
version: "0.10.0+2"
2424
code_transformers:
2525
description: code_transformers
2626
source: hosted
27-
version: "0.0.1-dev.2"
27+
version: "0.1.3"
2828
collection:
2929
description: collection
3030
source: hosted
3131
version: "0.9.1"
3232
di:
3333
description: di
3434
source: hosted
35-
version: "0.0.34"
35+
version: "0.0.37"
3636
html5lib:
3737
description: html5lib
3838
source: hosted
3939
version: "0.9.2"
4040
intl:
4141
description: intl
4242
source: hosted
43-
version: "0.8.10+4"
43+
version: "0.9.8"
4444
logging:
4545
description: logging
4646
source: hosted
@@ -49,14 +49,10 @@ packages:
4949
description: matcher
5050
source: hosted
5151
version: "0.10.0"
52-
meta:
53-
description: meta
54-
source: hosted
55-
version: "0.8.8"
5652
mock:
5753
description: mock
5854
source: hosted
59-
version: "0.10.0"
55+
version: "0.10.0+1"
6056
path:
6157
description: path
6258
source: hosted
@@ -68,7 +64,7 @@ packages:
6864
route_hierarchical:
6965
description: route_hierarchical
7066
source: hosted
71-
version: "0.4.15"
67+
version: "0.4.18"
7268
shadow_dom:
7369
description: shadow_dom
7470
source: hosted
@@ -80,11 +76,11 @@ packages:
8076
stack_trace:
8177
description: stack_trace
8278
source: hosted
83-
version: "0.9.3"
79+
version: "0.9.3+1"
8480
unittest:
8581
description: unittest
8682
source: hosted
87-
version: "0.10.1+1"
83+
version: "0.10.1+2"
8884
utf:
8985
description: utf
9086
source: hosted

Chapter_01/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: angular_dart_demo
22
version: 0.0.1
33
dependencies:
4-
angular: '>=0.9.10'
4+
angular: 0.10.0
55
shadow_dom: any
6-
76
dev_dependencies:
8-
unittest: any
7+
unittest: any
8+
transformers:
9+
- angular

Chapter_01/web/main.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import 'package:angular/angular.dart';
2-
3-
// Temporary, please follow https://github.com/angular/angular.dart/issues/476
4-
@MirrorsUsed(override: '*')
5-
import 'dart:mirrors';
2+
import 'package:angular/application_factory.dart';
63

74
void main() {
8-
ngBootstrap();
5+
applicationFactory().run();
96
}

Chapter_02/pubspec.lock

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ packages:
44
analyzer:
55
description: analyzer
66
source: hosted
7-
version: "0.12.2"
7+
version: "0.13.5"
88
angular:
99
description: angular
1010
source: hosted
11-
version: "0.9.10"
11+
version: "0.10.0"
1212
args:
1313
description: args
1414
source: hosted
1515
version: "0.10.0+2"
1616
barback:
1717
description: barback
1818
source: hosted
19-
version: "0.11.1"
19+
version: "0.12.0"
2020
browser:
2121
description: browser
2222
source: hosted
23-
version: "0.9.1"
23+
version: "0.10.0+2"
2424
code_transformers:
2525
description: code_transformers
2626
source: hosted
27-
version: "0.0.1-dev.2"
27+
version: "0.1.3"
2828
collection:
2929
description: collection
3030
source: hosted
3131
version: "0.9.1"
3232
di:
3333
description: di
3434
source: hosted
35-
version: "0.0.34"
35+
version: "0.0.37"
3636
html5lib:
3737
description: html5lib
3838
source: hosted
3939
version: "0.9.2"
4040
intl:
4141
description: intl
4242
source: hosted
43-
version: "0.8.10+4"
43+
version: "0.9.8"
4444
js:
4545
description: js
4646
source: hosted
@@ -53,14 +53,10 @@ packages:
5353
description: matcher
5454
source: hosted
5555
version: "0.10.0"
56-
meta:
57-
description: meta
58-
source: hosted
59-
version: "0.8.8"
6056
mock:
6157
description: mock
6258
source: hosted
63-
version: "0.10.0"
59+
version: "0.10.0+1"
6460
path:
6561
description: path
6662
source: hosted
@@ -72,7 +68,7 @@ packages:
7268
route_hierarchical:
7369
description: route_hierarchical
7470
source: hosted
75-
version: "0.4.15"
71+
version: "0.4.18"
7672
shadow_dom:
7773
description: shadow_dom
7874
source: hosted
@@ -84,7 +80,7 @@ packages:
8480
stack_trace:
8581
description: stack_trace
8682
source: hosted
87-
version: "0.9.3"
83+
version: "0.9.3+1"
8884
unittest:
8985
description: unittest
9086
source: hosted

Chapter_02/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: angular_dart_demo
22
version: 0.0.1
33
dependencies:
4-
angular: '>=0.9.10'
4+
angular: 0.10.0
55
browser: any
66
js: any
77
shadow_dom: any
8-
98
dev_dependencies:
109
unittest: any
10+
transformers:
11+
- angular

Chapter_02/test/karma.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = function(config) {
88
'test/main_test.dart',
99
{pattern: '**/*.dart', watched: false, included: false, served: true},
1010
{pattern: 'packages/browser/dart.js', watched: false, included: true, served: true},
11-
{pattern: 'packages/browser/interop.js', watched: false, included: true, served: true},
1211
],
1312

1413
autoWatch: true,

Chapter_02/web/main.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
library recipe_book;
22

33
import 'package:angular/angular.dart';
4+
import 'package:angular/application_factory.dart';
45

5-
// Temporary, please follow https://github.com/angular/angular.dart/issues/476
6-
@MirrorsUsed(targets: const['recipe_book'], override: '*')
7-
import 'dart:mirrors';
8-
9-
/* Use the @NgController annotation to indicate that this class is an
6+
/* Use the @Controller annotation to indicate that this class is an
107
* Angular controller. Angular will instantiate the controller if
118
* it finds an element matching its selector in the DOM.
129
*
@@ -20,7 +17,7 @@ import 'dart:mirrors';
2017
* The controller's public fields are available for data binding from the view.
2118
* Similarly, the controller's public methods can be invoked from the view.
2219
*/
23-
@NgController(
20+
@Controller(
2421
selector: '[recipe-book]',
2522
publishAs: 'ctrl')
2623
class RecipeBookController {
@@ -80,5 +77,7 @@ class MyAppModule extends Module {
8077
}
8178

8279
void main() {
83-
ngBootstrap(module: new MyAppModule());
80+
applicationFactory()
81+
.addModule(new MyAppModule())
82+
.run();
8483
}

Chapter_03/lib/rating/rating_component.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library rating;
22

33
import 'package:angular/angular.dart';
44

5-
/* Use the @NgComponent annotation to indicate that this class is an
5+
/* Use the @Component annotation to indicate that this class is an
66
* Angular component.
77
*
88
* The selector field defines the CSS selector that will trigger the
@@ -27,7 +27,7 @@ import 'package:angular/angular.dart';
2727
* component's view. Similarly, the component's public methods can be
2828
* invoked from the component's view.
2929
*/
30-
@NgComponent(
30+
@Component(
3131
selector: 'rating',
3232
templateUrl: 'packages/angular_dart_demo/rating/rating_component.html',
3333
cssUrl: 'packages/angular_dart_demo/rating/rating_component.css',

Chapter_03/lib/recipe_book.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library recipe_book_controller;
22

33
import 'package:angular/angular.dart';
44

5-
@NgController(
5+
@Controller(
66
selector: '[recipe-book]',
77
publishAs: 'ctrl')
88
class RecipeBookController {

Chapter_03/pubspec.lock

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ packages:
44
analyzer:
55
description: analyzer
66
source: hosted
7-
version: "0.12.2"
7+
version: "0.13.5"
88
angular:
99
description: angular
1010
source: hosted
11-
version: "0.9.10"
11+
version: "0.10.0"
1212
args:
1313
description: args
1414
source: hosted
1515
version: "0.10.0+2"
1616
barback:
1717
description: barback
1818
source: hosted
19-
version: "0.11.1"
19+
version: "0.12.0"
2020
browser:
2121
description: browser
2222
source: hosted
23-
version: "0.9.1"
23+
version: "0.10.0+2"
2424
code_transformers:
2525
description: code_transformers
2626
source: hosted
27-
version: "0.0.1-dev.2"
27+
version: "0.1.3"
2828
collection:
2929
description: collection
3030
source: hosted
3131
version: "0.9.1"
3232
di:
3333
description: di
3434
source: hosted
35-
version: "0.0.34"
35+
version: "0.0.37"
3636
html5lib:
3737
description: html5lib
3838
source: hosted
3939
version: "0.9.2"
4040
intl:
4141
description: intl
4242
source: hosted
43-
version: "0.8.10+4"
43+
version: "0.9.8"
4444
js:
4545
description: js
4646
source: hosted
@@ -53,14 +53,10 @@ packages:
5353
description: matcher
5454
source: hosted
5555
version: "0.10.0"
56-
meta:
57-
description: meta
58-
source: hosted
59-
version: "0.8.8"
6056
mock:
6157
description: mock
6258
source: hosted
63-
version: "0.10.0"
59+
version: "0.10.0+1"
6460
path:
6561
description: path
6662
source: hosted
@@ -72,7 +68,7 @@ packages:
7268
route_hierarchical:
7369
description: route_hierarchical
7470
source: hosted
75-
version: "0.4.15"
71+
version: "0.4.18"
7672
shadow_dom:
7773
description: shadow_dom
7874
source: hosted
@@ -84,11 +80,11 @@ packages:
8480
stack_trace:
8581
description: stack_trace
8682
source: hosted
87-
version: "0.9.3"
83+
version: "0.9.3+1"
8884
unittest:
8985
description: unittest
9086
source: hosted
91-
version: "0.10.1+1"
87+
version: "0.10.1+2"
9288
utf:
9389
description: utf
9490
source: hosted

Chapter_03/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: angular_dart_demo
22
version: 0.0.1
33
dependencies:
4-
angular: '>=0.9.10'
4+
angular: 0.10.0
55
browser: any
66
js: any
77
shadow_dom: any
8-
98
dev_dependencies:
109
unittest: any
10+
transformers:
11+
- angular

Chapter_03/test/karma.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = function(config) {
88
'test/main_test.dart',
99
{pattern: '**/*.dart', watched: false, included: false, served: true},
1010
{pattern: 'packages/browser/dart.js', watched: false, included: true, served: true},
11-
{pattern: 'packages/browser/interop.js', watched: false, included: true, served: true},
1211
],
1312

1413
autoWatch: false,

0 commit comments

Comments
 (0)