add not login message to search demo

This commit is contained in:
Mario Romano
2016-06-02 11:34:27 +01:00
parent b1ba96a6a7
commit 9294b4542c

View File

@@ -36,11 +36,14 @@ import {
@Component({ @Component({
selector: 'alfresco-search-demo', selector: 'alfresco-search-demo',
template: ` template: `
<div class="container"> <div class="container" *ngIf="authenticated">
<alfresco-search-control *ngIf="authenticated" [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>
</div> </div>
<div *ngIf="!authenticated">
Authentication failed to ip {{ host }}
</div>
`, `,
styles: [':host > .container {padding: 10px}'], styles: [':host > .container {padding: 10px}'],
providers: [ALFRESCO_SEARCH_PROVIDERS], providers: [ALFRESCO_SEARCH_PROVIDERS],
@@ -53,13 +56,15 @@ class SearchDemo implements OnInit {
public searchTerm: string = 'foo bar'; public searchTerm: string = 'foo bar';
host: string = 'http://192.168.99.100:8080';
constructor( constructor(
private authService: AlfrescoAuthenticationService, private authService: AlfrescoAuthenticationService,
settings: AlfrescoSettingsService, settings: AlfrescoSettingsService,
translation: AlfrescoTranslationService, translation: AlfrescoTranslationService,
searchService: AlfrescoService) { searchService: AlfrescoService) {
settings.host = 'http://192.168.99.100:8080'; settings.host = this.host;
translation.translationInit(); translation.translationInit();
} }