core/i18n/c8y-translate.directive.ts
TranslateDirective
AfterViewInit
OnDestroy
OnChanges
Selector | [translate],[ngx-translate] |
Standalone | true |
Properties |
Methods |
constructor(translateService: TranslateService, element: ElementRef, _ref: ChangeDetectorRef)
|
||||||||||||
Parameters :
|
checkNodes | ||||||||||||
checkNodes(forceUpdate, translations?: any)
|
||||||||||||
Overridden method from original directive.
For simple text nodes, it just invokes the base method.
For complex nodes, it builds translation key from whole
Parameters :
Returns :
void
|
ngAfterViewInit |
ngAfterViewInit()
|
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
setTranslatedStatus | ||||||
setTranslatedStatus(status: boolean)
|
||||||
Parameters :
Returns :
void
|
destroy$ |
Default value : new Subject<void>()
|
elementTranslated |
Default value : false
|
htmlMode |
Type : boolean
|
When this directive encounters element that is HTML, it should switch to Html mode even if new translated element does not contain any HTML. |
htmlUpdateEvent |
Type : EventEmitter<void>
|
Default value : new EventEmitter<void>()
|
Used to trigger events when html is replaced by directive. |
initialValue |
Type : string
|
lastTranslation |
Type : string
|
When this directive successfully translates node, it stores its value in this property. Another translation will be performed only if new translation value differs from stored one. |