Skip to content

Commit 65c2e3f

Browse files
committed
Merge pull request #1044 from ozsay/master
fix migration guide initial route
2 parents 6c8c21a + 33415fb commit 65c2e3f

File tree

3 files changed

+418
-60
lines changed

3 files changed

+418
-60
lines changed

docs/angular-meteor/both/router/router.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,12 @@ Router.map(function () {
188188

189189
redirect('/api', '/api/' + DEFAULT_API + '/helpers');
190190

191-
self.route('migration', {
192-
path: '/migration',
193-
template: 'migration'
194-
});
191+
// -------------------------------------------------------------------------
192+
// Migration routes
193+
//
194+
195+
redirect('/migration', '/migration/angular1/intro');
196+
195197
createSubRoutes(MIGRATION);
196198

197199
// -------------------------------------------------------------------------

docs/angular-meteor/client/content/migration/angular1/bottomup.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ This migration approach lets you migrate full component (both logic and view) at
77
The first step that we need to do is add the required packages for our project.
88

99
```bash
10-
meteor add pbastowski:angular-babel
11-
meteor add pbastowski:angular2-now
12-
meteor add angular-with-blaze
13-
meteor add urigo:angular-blaze-template
14-
meteor add angularui:angular-ui-router
15-
meteor add dotansimha:angular-reactive-component
10+
meteor add pbastowski:angular-babel@1.0.7
11+
meteor add pbastowski:angular2-now@1.0.2
12+
meteor add angular-with-blaze@1.3.2
13+
meteor add urigo:angular-blaze-template@0.3.0
14+
meteor add angularui:angular-ui-router@0.2.15
15+
meteor add dotansimha:angular-reactive-component@0.0.4
1616
```
1717

1818
or in one command
1919

2020
```bash
21-
meteor add pbastowski:angular-babel pbastowski:angular2-now angular-with-blaze urigo:angular-blaze-template angularui:angular-ui-router dotansimha:angular-reactive-component
21+
meteor add pbastowski:angular-babel@1.0.7 pbastowski:angular2-now@1.0.2 angular-with-blaze@1.3.2 urigo:angular-blaze-template@0.3.0 angularui:angular-ui-router@0.2.15 dotansimha:angular-reactive-component@0.0.4
2222
```
2323

2424
> Please make sure that the installed angular package is newer than 1.3.1. If it's not, change the version in `.meteor/versions` file.
@@ -99,14 +99,10 @@ var $compile = window.ngInjector.get('$compile');
9999
We use the injector of our module that we stored in window to inject the required dependencies for our component instantiation.
100100

101101
```javascript
102-
this.scope = $rootScope.$new(true);
102+
this.scope = $rootScope.$new();
103103
```
104104

105-
We create a new scope which is isolated. **Why isolated?** One of our next steps will be to create the `list` component.
106-
In this step, we will use the `ngRepeat` directive to create each todos item. Foreach item, `ngRepeat` will create an isolated scope.
107-
So we mimic the future behavior. Though it's not really different now, it will help us avoiding any problems later.
108-
109-
> My recommendation is to use isolated scope if your template is surrounded by `each` statement.
105+
We create a new scope for the component.
110106

111107
```javascript
112108
var controller = window.ngInjector.instantiate(window.TodosItem, {data: this.data, $scope: this.scope});
@@ -327,7 +323,7 @@ class TodosItem extends ReactiveComponent {
327323

328324
Now we can mark `todos-item` as finished and move on to the next component.
329325

330-
> You can check out the [commits comparison](https://github.com/ozsay/blaze2angular/compare/128b0af7795b296ec8f554e8b5dac4830b4fc725...82e8af9bbebc4ebfa588fe852993853f8c06a249) for the full change list.
326+
> You can check out the [commits comparison](https://github.com/ozsay/blaze2angular/compare/f4b898519a4d5783d86439afb0e191e7a8fc03a3...628923d5be3b321d69aafa9b989630a3bdf2f0ff) for the full change list.
331327
332328
We will use the same principles to convert the `list` component.
333329
Please follow [this commits comparison](https://github.com/) to check out the change list.

0 commit comments

Comments
 (0)