docs(upgrade): bring phonecat up to speed with rc.1. Use router-deprecated.
closes #1357
This commit is contained in:
parent
fedc39dd52
commit
ba47da0d70
|
@ -24,7 +24,7 @@ angular.module('phonecatApp', [
|
|||
|
||||
configure.$inject = ['$routeProvider'];
|
||||
|
||||
function configure($routeProvider) { }
|
||||
function configure($routeProvider) {
|
||||
// #docregion list-route
|
||||
$routeProvider.
|
||||
when('/phones', {
|
||||
|
|
|
@ -17,6 +17,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
"repository": "https://github.com/angular/angular-phonecat",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/common": "0.0.0-3",
|
||||
"@angular/compiler": "0.0.0-3",
|
||||
"@angular/core": "0.0.0-3",
|
||||
"@angular/http": "0.0.0-3",
|
||||
"@angular/platform-browser": "0.0.0-3",
|
||||
"@angular/platform-browser-dynamic": "0.0.0-3",
|
||||
"@angular/router": "0.0.0-3",
|
||||
"@angular/upgrade": "0.0.0-3",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
|
||||
"es6-shim": "^0.35.0",
|
||||
"reflect-metadata": "0.1.3",
|
||||
|
|
|
@ -29,6 +29,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
}
|
||||
|
@ -37,8 +38,8 @@ System.config({
|
|||
// #docregion ng2
|
||||
System.import('@angular/core/testing').then(function(testing) {
|
||||
return System.import('@angular/platform-browser-dynamic/testing').then(function(browserTesting) {
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_APPLICATION_PROVIDERS);
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
||||
});
|
||||
}).then(function() {
|
||||
return Promise.all(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// #docregion
|
||||
import { Component } from '@angular/core';
|
||||
import { RouteConfig, ROUTER_DIRECTIVES } from '@angular/router';
|
||||
import { RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated';
|
||||
|
||||
import PhoneList from './phone_list/phone_list.component';
|
||||
import PhoneDetail from './phone_detail/phone_detail.component';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { provide } from '@angular/core';
|
||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||
import { ROUTER_PROVIDERS } from '@angular/router';
|
||||
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
|
||||
|
||||
import { Phones } from './core/phones.service';
|
||||
import AppComponent from './app.component';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// #docregion
|
||||
// #docregion top
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { RouteParams } from '@angular/router';
|
||||
import { RouteParams } from '@angular/router-deprecated';
|
||||
|
||||
import { Phones, Phone } from '../core/phones.service';
|
||||
import { CheckmarkPipe } from '../core/checkmark.pipe';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// #docregion full
|
||||
// #docregion top
|
||||
import { Component } from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { RouterLink } from '@angular/router-deprecated';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Phones, Phone } from '../core/phones.service';
|
||||
|
|
|
@ -17,6 +17,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
"repository": "https://github.com/angular/angular-phonecat",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/common": "0.0.0-3",
|
||||
"@angular/compiler": "0.0.0-3",
|
||||
"@angular/core": "0.0.0-3",
|
||||
"@angular/http": "0.0.0-3",
|
||||
"@angular/platform-browser": "0.0.0-3",
|
||||
"@angular/platform-browser-dynamic": "0.0.0-3",
|
||||
"@angular/router": "0.0.0-3",
|
||||
"@angular/upgrade": "0.0.0-3",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
|
||||
"es6-shim": "^0.35.0",
|
||||
"reflect-metadata": "0.1.3",
|
||||
|
|
|
@ -29,6 +29,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
}
|
||||
|
@ -37,8 +38,8 @@ System.config({
|
|||
// #docregion ng2
|
||||
System.import('@angular/core/testing').then(function(testing) {
|
||||
return System.import('@angular/platform-browser-dynamic/testing').then(function(browserTesting) {
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_APPLICATION_PROVIDERS);
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
||||
});
|
||||
}).then(function() {
|
||||
return Promise.all(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { provide } from '@angular/core';
|
||||
// #docregion routeparams
|
||||
import { RouteParams } from '@angular/router';
|
||||
import { RouteParams } from '@angular/router-deprecated';
|
||||
// #enddocregion routeparams
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { provide, ApplicationRef } from '@angular/core';
|
||||
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
import { ROUTER_PROVIDERS, ROUTER_PRIMARY_COMPONENT } from '@angular/router';
|
||||
import { ROUTER_PROVIDERS, ROUTER_PRIMARY_COMPONENT } from '@angular/router-deprecated';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import {
|
||||
describe,
|
||||
|
|
|
@ -18,6 +18,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
"repository": "https://github.com/angular/angular-phonecat",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/common": "0.0.0-3",
|
||||
"@angular/compiler": "0.0.0-3",
|
||||
"@angular/core": "0.0.0-3",
|
||||
"@angular/http": "0.0.0-3",
|
||||
"@angular/platform-browser": "0.0.0-3",
|
||||
"@angular/platform-browser-dynamic": "0.0.0-3",
|
||||
"@angular/router": "0.0.0-3",
|
||||
"@angular/upgrade": "0.0.0-3",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
|
||||
"es6-shim": "^0.35.0",
|
||||
"reflect-metadata": "0.1.3",
|
||||
|
|
|
@ -29,6 +29,7 @@ System.config({
|
|||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/router-deprecated': { main: 'index.js', defaultExtension: 'js' },
|
||||
'@angular/upgrade': { main: 'index.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' }
|
||||
}
|
||||
|
@ -37,8 +38,8 @@ System.config({
|
|||
// #docregion ng2
|
||||
System.import('@angular/core/testing').then(function(testing) {
|
||||
return System.import('@angular/platform-browser-dynamic/testing').then(function(browserTesting) {
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_APPLICATION_PROVIDERS);
|
||||
testing.setBaseTestProviders(browserTesting.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
browserTesting.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
||||
});
|
||||
}).then(function() {
|
||||
return Promise.all(
|
||||
|
|
Loading…
Reference in New Issue