diff --git a/Readme.md b/Readme.md
index b5726fd..81393f4 100644
--- a/Readme.md
+++ b/Readme.md
@@ -14,5 +14,5 @@ Clone this repository as well as [the server](https://github.com/auth0/nodejs-jw
First, run the server app in the port `3001`.
-Then, run `npm install` on this project and run `npm startwatch` to start the app. Then just navigate to [http://localhost:3000](http://localhost:3000) :boom:
+Then, run `npm install` on this project and run `npm start` to start the app. Then just navigate to [http://localhost:3000](http://localhost:3000) :boom:
diff --git a/src/app/app.ts b/src/app/app.ts
index f28ea01..66d5f51 100644
--- a/src/app/app.ts
+++ b/src/app/app.ts
@@ -1,6 +1,6 @@
///
-import {View, Component} from 'angular2/angular2';
+import {View, Component, Inject} from 'angular2/angular2';
import {Location, RouteConfig, RouterLink, Router} from 'angular2/router';
import {LoggedInRouterOutlet} from './LoggedInOutlet';
import {Home} from '../home/home';
@@ -24,6 +24,6 @@ let template = require('./app.html');
{ path: '/signup', as: 'signup', component: Signup }
])
export class App {
- constructor(public router: Router) {
+ constructor(@Inject(Router) router: Router) {
}
}
diff --git a/src/home/home.ts b/src/home/home.ts
index a10ffea..fac0689 100644
--- a/src/home/home.ts
+++ b/src/home/home.ts
@@ -1,9 +1,9 @@
///
-import {Component, View} from 'angular2/angular2';
+import {Component, View, Inject} from 'angular2/angular2';
import {coreDirectives} from 'angular2/directives';
import {status, text} from '../utils/fetch'
-import { Router} from 'angular2/router';
+import {Router} from 'angular2/router';
let styles = require('./home.css');
let template = require('./home.html');
@@ -22,8 +22,10 @@ export class Home {
decodedJwt: string;
response: string;
api: string;
+ router: Router;
- constructor(public router: Router) {
+ constructor(@Inject(Router) router: Router) {
+ this.router = router;
this.jwt = localStorage.getItem('jwt');
this.decodedJwt = this.jwt && window.jwt_decode(this.jwt);
}
diff --git a/src/login/login.ts b/src/login/login.ts
index 9bfd200..c24dd4c 100644
--- a/src/login/login.ts
+++ b/src/login/login.ts
@@ -1,8 +1,8 @@
///
-import {Component, View} from 'angular2/angular2';
+import {Component, View, Inject} from 'angular2/angular2';
import {status, json} from '../utils/fetch'
-import { Router, RouterLink } from 'angular2/router';
+import {Router, RouterLink } from 'angular2/router';
let styles = require('./login.css');
@@ -18,7 +18,10 @@ let template = require('./login.html');
directives: [RouterLink]
})
export class Login {
- constructor(public router: Router) {
+ router: Router;
+
+ constructor(@Inject(Router) router: Router) {
+ this.router = router;
}
login(event, username, password) {
diff --git a/src/signup/signup.ts b/src/signup/signup.ts
index a4f0f27..4f2b408 100644
--- a/src/signup/signup.ts
+++ b/src/signup/signup.ts
@@ -1,9 +1,9 @@
///
import {coreDirectives} from 'angular2/directives';
-import {Component, View} from 'angular2/angular2';
+import {Component, View, Inject} from 'angular2/angular2';
import {status, json} from '../utils/fetch';
-import { Router, RouterLink } from 'angular2/router';
+import {Router, RouterLink } from 'angular2/router';
let styles = require('./signup.css');
let template = require('./signup.html');
@@ -16,8 +16,12 @@ let template = require('./signup.html');
styles: [ styles ],
template: template
})
+
export class Signup {
- constructor(public router: Router) {
+ router: Router;
+
+ constructor(@Inject(Router) router: Router) {
+ this.router = router;
}
signup(event, username, password) {
diff --git a/tsconfig.json b/tsconfig.json
deleted file mode 100644
index bbe0232..0000000
--- a/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "version": "1.5.0",
- "compilerOptions": {
- "target": "es5",
- "module": "commonjs",
- "declaration": false,
- "noImplicitAny": false,
- "removeComments": true,
- "noLib": false,
- "emitDecoratorMetadata": true,
- "sourceMap": true,
- "listFiles": true,
- "outDir": "dist"
- },
- "files": [
- "node_modules/typescript/bin/dom.d.ts",
- "src/custom_typings/ng2.d.ts",
- "typings/tsd.d.ts",
- "src/components/app.ts",
- "src/bootstrap.ts"
- ]
-}