mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -7,9 +7,8 @@
|
||||
<!-- Add spacer, to align navigation to the right -->
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
|
||||
<!-- Search box -->
|
||||
<alfresco-search-control *ngIf="isLoggedIn()" [searchTerm]="searchTerm"
|
||||
(searchChange)="searchTermChange($event);" [autocomplete]="false"></alfresco-search-control>
|
||||
<!-- Search bar -->
|
||||
<search-bar></search-bar>
|
||||
|
||||
<!-- Navigation. We hide it in small screens. -->
|
||||
<nav class="mdl-navigation mdl-layout--large-screen-only">
|
||||
|
@@ -29,7 +29,7 @@ import {
|
||||
import { UploadButtonComponent } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
||||
import { DataTableDemoComponent } from './components/datatable/datatable-demo.component';
|
||||
import { SearchComponent } from './components/search/search.component';
|
||||
import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search/dist/ng2-alfresco-search';
|
||||
import { SearchBarComponent } from './components/search/search-bar.component';
|
||||
import { LoginDemoComponent } from './components/login/login-demo.component';
|
||||
import { TasksDemoComponent } from './components/tasks/tasks-demo.component';
|
||||
|
||||
@@ -39,7 +39,7 @@ declare var document: any;
|
||||
selector: 'alfresco-app',
|
||||
templateUrl: 'app/app.component.html',
|
||||
styleUrls: ['app/app.component.css'],
|
||||
directives: [ALFRESCO_SEARCH_DIRECTIVES, ROUTER_DIRECTIVES, AuthRouterOutlet, MDL],
|
||||
directives: [SearchBarComponent, ROUTER_DIRECTIVES, AuthRouterOutlet, MDL],
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
@RouteConfig([
|
||||
@@ -90,15 +90,4 @@ export class AppComponent {
|
||||
// todo: workaround for drawer closing
|
||||
document.querySelector('.mdl-layout').MaterialLayout.toggleDrawer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a new search term is submitted
|
||||
*
|
||||
* @param params Parameters relating to the search
|
||||
*/
|
||||
searchTermChange(params) {
|
||||
this.router.navigate(['Search', {
|
||||
q: params.value
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user