rsanchez
2017-03-10 2762277c60db7df5ad3214b10a0dd93d4f2f1128
securis/src/main/webapp/src/app/login.form.component.ts
....@@ -19,12 +19,14 @@
1919 public constructor(private toaster: ToastsManager,
2020 private router: Router,
2121 private userService: UserService) {
22
+ this.data.username = 'admin';
23
+ this.data.password = 'securis';
2224 }
2325
2426 public login() {
2527 this.userService.login(this.data.username, this.data.password).subscribe(
26
- token => this.toaster.info('Hola'),
27
- err => this.toaster.error('Hubo un error: ' + err));
28
+ token => this.router.navigateByUrl("packs"),
29
+ errMsg => this.toaster.error(errMsg, 'Login error'));
2830 }
2931
3032 public clear() {