mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix search demo
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"ng2-alfresco-core": "^0.1.36",
|
||||
"ng2-alfresco-search": "file:../"
|
||||
"ng2-alfresco-search": "^0.1.25"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "2.0.0",
|
||||
|
@@ -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 => {
|
||||
|
Reference in New Issue
Block a user