From 4a6995be18b15de1834a39c8921a0e4109671bb6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Jun 2016 22:08:03 +0200 Subject: First draft to use webpack instead of systemjs --- client/app/login/index.ts | 1 - client/app/login/login.component.html | 14 -------------- client/app/login/login.component.ts | 36 ----------------------------------- 3 files changed, 51 deletions(-) delete mode 100644 client/app/login/index.ts delete mode 100644 client/app/login/login.component.html delete mode 100644 client/app/login/login.component.ts (limited to 'client/app/login') diff --git a/client/app/login/index.ts b/client/app/login/index.ts deleted file mode 100644 index 69c16441f..000000000 --- a/client/app/login/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './login.component'; diff --git a/client/app/login/login.component.html b/client/app/login/login.component.html deleted file mode 100644 index 940694515..000000000 --- a/client/app/login/login.component.html +++ /dev/null @@ -1,14 +0,0 @@ -

Login

-
-
- - -
- -
- - -
- - -
diff --git a/client/app/login/login.component.ts b/client/app/login/login.component.ts deleted file mode 100644 index 50f598d92..000000000 --- a/client/app/login/login.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; -import { Router } from '@angular/router-deprecated'; - -import { AuthService, AuthStatus, User } from '../shared/index'; - -@Component({ - selector: 'my-login', - templateUrl: 'client/app/login/login.component.html' -}) - -export class LoginComponent { - constructor( - private authService: AuthService, - private router: Router - ) {} - - login(username: string, password: string) { - this.authService.login(username, password).subscribe( - result => { - const user = new User(username, result); - user.save(); - - this.authService.setStatus(AuthStatus.LoggedIn); - - this.router.navigate(['VideosList']); - }, - error => { - if (error.error === 'invalid_grant') { - alert('Credentials are invalid.'); - } else { - alert(`${error.error}: ${error.error_description}`); - } - } - ); - } -} -- cgit v1.2.3