Skip to content

Fix webpack and router compile errors #33

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

4 changes: 2 additions & 2 deletions src/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference path="../../typings/tsd.d.ts" />

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';
Expand All @@ -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) {
}
}
8 changes: 5 additions & 3 deletions src/home/home.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference path="../../typings/tsd.d.ts" />

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');
Expand All @@ -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);
}
Expand Down
9 changes: 6 additions & 3 deletions src/login/login.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// <reference path="../../typings/tsd.d.ts" />

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');
Expand All @@ -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) {
Expand Down
10 changes: 7 additions & 3 deletions src/signup/signup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference path="../../typings/tsd.d.ts" />

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');
Expand All @@ -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) {
Expand Down
22 changes: 0 additions & 22 deletions tsconfig.json

This file was deleted.