mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -5,9 +5,10 @@ import {Authentication} from '../services/authentication';
|
||||
|
||||
@Component({
|
||||
selector: 'login',
|
||||
moduleId: 'app/components/login',
|
||||
directives: [ROUTER_DIRECTIVES, FORM_DIRECTIVES],
|
||||
templateUrl: 'app/template/login.component.html',
|
||||
styleUrls: ['app/style/login.component.css'],
|
||||
templateUrl: 'login.component.html',
|
||||
styleUrls: ['login.component.css'],
|
||||
})
|
||||
export class Login {
|
||||
form:ControlGroup;
|
||||
@@ -29,7 +30,9 @@ export class Login {
|
||||
}
|
||||
|
||||
onSubmit(value:any, event) {
|
||||
event.preventDefault();
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
this.auth.login('POST', value.username, value.password)
|
||||
.subscribe(
|
||||
(token:any) => this.router.navigate(['Home']),
|
||||
|
@@ -2,7 +2,7 @@ import {Injectable} from 'angular2/core';
|
||||
import {Observable} from 'rxjs/Rx';
|
||||
import {Http, Headers, URLSearchParams, Response} from 'angular2/http';
|
||||
|
||||
declare var xml2json:any;
|
||||
declare let xml2json:any;
|
||||
|
||||
@Injectable()
|
||||
export class Authentication {
|
||||
|
Reference in New Issue
Block a user