diff --git a/frontend/app/app.component.ts b/frontend/app/app.component.ts index 1d5fadc1..4d352d29 100644 --- a/frontend/app/app.component.ts +++ b/frontend/app/app.component.ts @@ -7,7 +7,7 @@ import {AuthenticationService} from "./model/authentication.service"; import {GalleryComponent} from "./gallery/gallery.component"; import {OnInit} from "angular2/core"; import {User} from "../../common/entities/User"; -import {Router, Location} from "angular2/router"; +import {Router} from "angular2/router"; import {HTTP_PROVIDERS} from "angular2/http"; import {UserService} from "./model/user.service"; import {GalleryService} from "./gallery/gallery.service"; @@ -51,7 +51,7 @@ import {ViewportHelper} from "ng2-material/core/util/viewport"; ]) export class AppComponent implements OnInit{ - constructor(private _router: Router, private _location:Location, private _authenticationService: AuthenticationService){ + constructor(private _router: Router, private _authenticationService: AuthenticationService){ } ngOnInit() { diff --git a/frontend/app/gallery/gallery.component.ts b/frontend/app/gallery/gallery.component.ts index 6c5ebdb9..3d887c3b 100644 --- a/frontend/app/gallery/gallery.component.ts +++ b/frontend/app/gallery/gallery.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from 'angular2/core'; import {AuthenticationService} from "../model/authentication.service"; -import {Router, Location, RouteParams} from "angular2/router"; +import {Router, RouteParams} from "angular2/router"; import {GalleryService} from "./gallery.service"; import {Directory} from "../../../common/entities/Directory"; import {Message} from "../../../common/entities/Message"; @@ -33,7 +33,6 @@ export class GalleryComponent implements OnInit{ ngOnInit(){ if (!this._authService.isAuthenticated()) { - // this._location.replaceState('/'); // clears browser history so they can't navigate with back button this._router.navigate(['Login']); return; } diff --git a/frontend/app/login/login.component.ts b/frontend/app/login/login.component.ts index 1acf4d63..bef0d343 100644 --- a/frontend/app/login/login.component.ts +++ b/frontend/app/login/login.component.ts @@ -3,7 +3,7 @@ import {Component, OnInit} from 'angular2/core'; import {LoginCredential} from '../../../common/entities/LoginCredential'; import {AuthenticationService} from "../model/authentication.service"; -import {Router, Location} from "angular2/router"; +import {Router} from "angular2/router"; import {MATERIAL_DIRECTIVES} from "ng2-material/all"; import {FORM_DIRECTIVES} from "angular2/common"; import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all"; @@ -18,13 +18,12 @@ import {ViewportHelper} from "ng2-material/all"; }) export class LoginComponent implements OnInit{ loginCredential: LoginCredential; - constructor(private _authService: AuthenticationService, private _router: Router, private _location:Location) { + constructor(private _authService: AuthenticationService, private _router: Router) { this.loginCredential = new LoginCredential(); } ngOnInit(){ if (this._authService.isAuthenticated()) { - // this._location.replaceState('/'); // clears browser history so they can't navigate with back button this._router.navigate(['Gallery']); } } diff --git a/package.json b/package.json index bb9b49ca..a4fa8742 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "url": "https://github.com/bpatrik/PiGallery2/issues" }, "dependencies": { - "angular2": "^2.0.0-beta.15", + "angular2": "^2.0.0-beta.16", "body-parser": "^1.15.0", "core-js": "^2.3.0", "debug": "^2.2.0", @@ -39,14 +39,15 @@ "ng2-cookies": "^0.1.5", "ng2-material": "^0.3.7", "optimist": "^0.6.1", + "protractor": "^3.3.0", "remap-istanbul": "^0.6.3", "rxjs": "5.0.0-beta.2", "style-loader": "^0.13.1", "ts-loader": "^0.8.2", - "tslint": "^3.8.0", + "tslint": "^3.8.1", "tslint-loader": "^2.1.4", "typescript": "^1.8.10", - "typings": "^0.7.9", + "typings": "^0.8.1", "webpack": "^1.13.0", "zone.js": "^0.6.12" },