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",
|
"alfresco-js-api": "^0.1.0",
|
||||||
"ng2-alfresco-core": "^0.1.36",
|
"ng2-alfresco-core": "^0.1.36",
|
||||||
"ng2-alfresco-search": "file:../"
|
"ng2-alfresco-search": "^0.1.25"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "2.0.0",
|
"concurrently": "2.0.0",
|
||||||
|
@@ -41,7 +41,7 @@ import {
|
|||||||
operations.
|
operations.
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="container" >
|
<div class="container" *ngIf="authenticated">
|
||||||
<alfresco-search-control [searchTerm]="searchTerm"
|
<alfresco-search-control [searchTerm]="searchTerm"
|
||||||
(searchChange)="searchTermChange($event);"></alfresco-search-control>
|
(searchChange)="searchTermChange($event);"></alfresco-search-control>
|
||||||
<alfresco-search [searchTerm]="searchTerm"></alfresco-search>
|
<alfresco-search [searchTerm]="searchTerm"></alfresco-search>
|
||||||
@@ -67,17 +67,10 @@ class SearchDemo implements OnInit {
|
|||||||
translation: AlfrescoTranslationService) {
|
translation: AlfrescoTranslationService) {
|
||||||
|
|
||||||
alfrescoSettingsService.host = this.host;
|
alfrescoSettingsService.host = this.host;
|
||||||
if (this.authService.getToken()) {
|
|
||||||
this.token = this.authService.getToken();
|
|
||||||
}
|
|
||||||
|
|
||||||
translation.addTranslationFolder();
|
translation.addTranslationFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateToken(): void {
|
|
||||||
localStorage.setItem('token', this.token);
|
|
||||||
}
|
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.alfrescoSettingsService.host = this.host;
|
this.alfrescoSettingsService.host = this.host;
|
||||||
this.login();
|
this.login();
|
||||||
@@ -91,6 +84,7 @@ class SearchDemo implements OnInit {
|
|||||||
this.authService.login('admin', 'admin').subscribe(
|
this.authService.login('admin', 'admin').subscribe(
|
||||||
token => {
|
token => {
|
||||||
console.log(token);
|
console.log(token);
|
||||||
|
this.token = token;
|
||||||
this.authenticated = true;
|
this.authenticated = true;
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
Reference in New Issue
Block a user