Skip to content

Commit 4ed4b9c

Browse files
committed
Updated to rc.1. Closes auth0-blog#64.
1 parent 29f251c commit 4ed4b9c

File tree

9 files changed

+53
-50
lines changed

9 files changed

+53
-50
lines changed

package.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,24 @@
2424
},
2525
"homepage": "https://github.com/auth0/angular2-authentication-sample",
2626
"dependencies": {
27-
"angular2": "2.0.0-beta.9",
28-
"angular2-jwt": "0.1.8",
27+
"@angular/common": "2.0.0-rc.1",
28+
"@angular/compiler": "2.0.0-rc.1",
29+
"@angular/core": "2.0.0-rc.1",
30+
"@angular/http": "2.0.0-rc.1",
31+
"@angular/platform-browser": "2.0.0-rc.1",
32+
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
33+
"@angular/platform-server": "2.0.0-rc.1",
34+
"@angular/router": "2.0.0-rc.1",
35+
"@angular/router-deprecated": "2.0.0-rc.1",
36+
"angular2-jwt": "0.1.14",
2937
"bootstrap": "^3.3.6",
38+
"core-js": "^2.2.2",
3039
"es6-promise": "^3.1.2",
3140
"es6-shim": "^0.33.13",
3241
"es7-reflect-metadata": "^1.6.0",
3342
"jwt-decode": "^1.5.1",
34-
"rxjs": "5.0.0-beta.2",
35-
"zone.js": "0.5.15"
43+
"rxjs": "5.0.0-beta.6",
44+
"zone.js": "~0.6.12"
3645
},
3746
"devDependencies": {
3847
"css-loader": "^0.23.1",

src/app/LoggedInOutlet.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Directive, Attribute, ElementRef, DynamicComponentLoader} from 'angular2/core';
2-
import {Router, RouterOutlet, ComponentInstruction} from 'angular2/router';
1+
import {Directive, Attribute, ViewContainerRef, DynamicComponentLoader} from '@angular/core';
2+
import {Router, RouterOutlet, ComponentInstruction} from '@angular/router-deprecated';
33
import {Login} from '../login/login';
44

55
@Directive({
@@ -9,12 +9,13 @@ export class LoggedInRouterOutlet extends RouterOutlet {
99
publicRoutes: any;
1010
private parentRouter: Router;
1111

12-
constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader,
12+
constructor(_viewContainerRef: ViewContainerRef, _loader: DynamicComponentLoader,
1313
_parentRouter: Router, @Attribute('name') nameAttr: string) {
14-
super(_elementRef, _loader, _parentRouter, nameAttr);
14+
super(_viewContainerRef, _loader, _parentRouter, nameAttr);
1515

1616
this.parentRouter = _parentRouter;
17-
// The Boolean following each route below denotes whether the route requires authentication to view
17+
// The Boolean following each route below
18+
// denotes whether the route requires authentication to view
1819
this.publicRoutes = {
1920
'login': true,
2021
'signup': true

src/app/app.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {View, Component} from 'angular2/core';
2-
import {Location, RouteConfig, RouterLink, Router} from 'angular2/router';
1+
import {Component} from '@angular/core';
2+
import {RouteConfig, RouterLink, Router} from '@angular/router-deprecated';
33

44
import {LoggedInRouterOutlet} from './LoggedInOutlet';
55
import {Home} from '../home/home';
@@ -9,9 +9,7 @@ import {Signup} from '../signup/signup';
99
let template = require('./app.html');
1010

1111
@Component({
12-
selector: 'auth-app'
13-
})
14-
@View({
12+
selector: 'auth-app',
1513
template: template,
1614
directives: [ LoggedInRouterOutlet ]
1715
})

src/common/headers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Headers } from 'angular2/http';
1+
import { Headers } from '@angular/http';
22

33
export const contentHeaders = new Headers();
44
contentHeaders.append('Accept', 'application/json');

src/home/home.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import { Component, View } from 'angular2/core';
2-
import { CORE_DIRECTIVES } from 'angular2/common';
3-
import { Http, Headers } from 'angular2/http';
1+
import { Component } from '@angular/core';
2+
import { CORE_DIRECTIVES } from '@angular/common';
3+
import { Http, Headers } from '@angular/http';
4+
import { Router } from '@angular/router-deprecated';
45
import { AuthHttp } from 'angular2-jwt';
5-
import { Router } from 'angular2/router';
66

77
let styles = require('./home.css');
88
let template = require('./home.html');
99

1010

1111
@Component({
12-
selector: 'home'
13-
})
14-
@View({
12+
selector: 'home',
1513
directives: [CORE_DIRECTIVES],
1614
template: template,
1715
styles: [styles]

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { bootstrap } from 'angular2/platform/browser';
2-
import { provide } from 'angular2/core';
3-
import { FORM_PROVIDERS } from 'angular2/common';
4-
import { ROUTER_PROVIDERS } from 'angular2/router';
5-
import { Http, HTTP_PROVIDERS } from 'angular2/http';
1+
import { bootstrap } from '@angular/platform-browser-dynamic';
2+
import { provide } from '@angular/core';
3+
import { FORM_PROVIDERS } from '@angular/common';
4+
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
5+
import { Http, HTTP_PROVIDERS } from '@angular/http';
66
import { AuthConfig, AuthHttp } from 'angular2-jwt';
77

88
import { App } from './app/app';

src/login/login.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import { Component, View } from 'angular2/core';
2-
import { Router, RouterLink } from 'angular2/router';
3-
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common';
4-
import { Http, Headers } from 'angular2/http';
1+
import { Component } from '@angular/core';
2+
import { Router, RouterLink } from '@angular/router-deprecated';
3+
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from '@angular/common';
4+
import { Http, Headers } from '@angular/http';
55
import { contentHeaders } from '../common/headers';
66

77
let styles = require('./login.css');
88
let template = require('./login.html');
99

1010
@Component({
11-
selector: 'login'
12-
})
13-
@View({
11+
selector: 'login',
1412
directives: [RouterLink, CORE_DIRECTIVES, FORM_DIRECTIVES ],
1513
template: template,
1614
styles: [ styles ]

src/signup/signup.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import { Component, View } from 'angular2/core';
2-
import { Router, RouterLink } from 'angular2/router';
3-
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common';
4-
import { Http } from 'angular2/http';
1+
import { Component } from '@angular/core';
2+
import { Router, RouterLink } from '@angular/router-deprecated';
3+
import { CORE_DIRECTIVES, FORM_DIRECTIVES } from '@angular/common';
4+
import { Http } from '@angular/http';
55
import { contentHeaders } from '../common/headers';
66

77
let styles = require('./signup.css');
88
let template = require('./signup.html');
99

1010
@Component({
11-
selector: 'signup'
12-
})
13-
@View({
11+
selector: 'signup',
1412
directives: [ RouterLink, CORE_DIRECTIVES, FORM_DIRECTIVES ],
1513
template: template,
1614
styles: [ styles ]

webpack.config.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ module.exports = {
1313
entry: {
1414
'vendor': [
1515
// Polyfills
16-
'es6-shim',
17-
'es6-promise',
18-
'reflect-metadata',
19-
'zone.js/dist/zone-microtask',
16+
'core-js/es6',
17+
'core-js/es7/reflect',
18+
'zone.js/dist/zone',
2019
'zone.js/dist/long-stack-trace-zone',
2120
// Angular2
22-
'angular2/platform/browser',
23-
'angular2/platform/common_dom',
24-
'angular2/core',
25-
'angular2/router',
26-
'angular2/http',
21+
'@angular/common',
22+
'@angular/platform-browser',
23+
'@angular/platform-browser-dynamic',
24+
'@angular/core',
25+
'@angular/router',
26+
'@angular/router-deprecated',
27+
'@angular/http',
2728
// RxJS
2829
'rxjs',
2930
// Other

0 commit comments

Comments
 (0)