fix search demo

This commit is contained in:
Eugenio Romano
2016-07-05 15:16:09 +01:00
parent 8b12e939ed
commit 5bd6259709
2 changed files with 3 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ import {
operations.
</div>
<hr>
<div class="container" >
<div class="container" *ngIf="authenticated">
<alfresco-search-control [searchTerm]="searchTerm"
(searchChange)="searchTermChange($event);"></alfresco-search-control>
<alfresco-search [searchTerm]="searchTerm"></alfresco-search>
@@ -67,17 +67,10 @@ class SearchDemo implements OnInit {
translation: AlfrescoTranslationService) {
alfrescoSettingsService.host = this.host;
if (this.authService.getToken()) {
this.token = this.authService.getToken();
}
translation.addTranslationFolder();
}
public updateToken(): void {
localStorage.setItem('token', this.token);
}
public updateHost(): void {
this.alfrescoSettingsService.host = this.host;
this.login();
@@ -91,6 +84,7 @@ class SearchDemo implements OnInit {
this.authService.login('admin', 'admin').subscribe(
token => {
console.log(token);
this.token = token;
this.authenticated = true;
},
error => {