mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Add i18n to search components
This commit is contained in:
@@ -19,6 +19,8 @@ import { Control, Validators } from 'angular2/common';
|
||||
import { Component, Input, Output, EventEmitter } from 'angular2/core';
|
||||
import { AlfrescoService } from './../services/alfresco.service';
|
||||
|
||||
import { AlfrescoPipeTranslate, AlfrescoTranslationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
||||
declare let __moduleName: string;
|
||||
declare var componentHandler: any;
|
||||
|
||||
@@ -28,7 +30,8 @@ declare var componentHandler: any;
|
||||
styles: [
|
||||
],
|
||||
templateUrl: './alfresco-search-control.component.html',
|
||||
providers: [AlfrescoService]
|
||||
providers: [AlfrescoService],
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
export class AlfrescoSearchControlComponent {
|
||||
|
||||
@@ -49,13 +52,14 @@ export class AlfrescoSearchControlComponent {
|
||||
|
||||
searchControl: Control;
|
||||
|
||||
constructor() {
|
||||
constructor(private translate: AlfrescoTranslationService) {
|
||||
|
||||
this.searchControl = new Control(
|
||||
this.searchTerm,
|
||||
Validators.compose([Validators.required, Validators.minLength(3)])
|
||||
);
|
||||
|
||||
translate.addComponent('node_modules/ng2-alfresco-search');
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
|
Reference in New Issue
Block a user