-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update to alpha 29 #24
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "angular2-full-app-demo", | ||
"name": "angular2-authentication-sample", | ||
"version": "0.0.0", | ||
"description": "This is a sample that shows how to add authentication to an Angular 2 (ng2) app", | ||
"main": "", | ||
|
@@ -11,17 +11,20 @@ | |
"type": "git", | ||
"url": "https://github.com/auth0/angular2-authentication-sample.git" | ||
}, | ||
"author": "Martin Gontovnikas (http://gon.to) <[email protected]>", | ||
"contributors": [ | ||
"Martin Gontovnikas (http://gon.to) <[email protected]>", | ||
"PatrickJS <[email protected]>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/auth0/angular2-authentication-sample/issues" | ||
}, | ||
"homepage": "https://github.com/auth0/angular2-authentication-sample", | ||
"dependencies": { | ||
"angular2": "2.0.0-alpha.26", | ||
"angular2": "2.0.0-alpha.29", | ||
"raw-loader": "^0.5.1", | ||
"reflect-metadata": "^0.1.0", | ||
"rtts_assert": "2.0.0-alpha.26", | ||
"rtts_assert": "2.0.0-alpha.29", | ||
"rx": "^2.5.3", | ||
"zone.js": "^0.5.0", | ||
"bootstrap": "~3.3.4", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
<router-outlet> | ||
</router-outlet> | ||
<router-outlet></router-outlet> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,18 +13,17 @@ let template = require('./home.html'); | |
selector: 'home' | ||
}) | ||
@View({ | ||
template:`<style>${styles}</style>\n${template}`, | ||
directives: [coreDirectives] | ||
styles: [ styles ], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yey! |
||
template: template, | ||
directives: [ coreDirectives ] | ||
}) | ||
export class Home { | ||
jwt: string; | ||
decodedJwt: string; | ||
router: Router; | ||
response: string; | ||
api: string; | ||
|
||
constructor(router: Router) { | ||
this.router = router; | ||
constructor(public router: Router) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to put one and one so that people can learn both. |
||
this.jwt = localStorage.getItem('jwt'); | ||
this.decodedJwt = this.jwt && window.jwt_decode(this.jwt); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
/// <reference path="../typings/tsd.d.ts" /> | ||
|
||
import {routerInjectables} from 'angular2/router'; | ||
import {formInjectables} from './common/formInjectables'; | ||
import { bootstrap } from 'angular2/angular2'; | ||
import { bind } from 'angular2/di'; | ||
import { PipeRegistry } from 'angular2/change_detection'; | ||
import { routerInjectables } from 'angular2/router'; | ||
import { formInjectables } from 'angular2/forms'; | ||
import { httpInjectables } from 'angular2/http'; | ||
|
||
import { App } from './app/app'; | ||
|
||
bootstrap( | ||
App, | ||
[ | ||
formInjectables, | ||
routerInjectables | ||
routerInjectables, | ||
httpInjectables | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pending alpha.30 release with Headers fix |
||
] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you must
return
here otherwise you will have an errorTypeError: Cannot read property 'then' of undefined