init order
This commit is contained in:
parent
6158076c44
commit
71f6a352f1
@ -1,4 +1,4 @@
|
||||
import {Component, OnInit, Input} from '@angular/core';
|
||||
import {Component, OnInit, Input, SimpleChanges, OnChanges} from '@angular/core';
|
||||
import {Sort} from '@angular/material/sort';
|
||||
import {I18nService} from './../../services/i18n.service';
|
||||
|
||||
@ -7,7 +7,7 @@ import {I18nService} from './../../services/i18n.service';
|
||||
templateUrl: './permissions.component.html',
|
||||
styleUrls: ['./permissions.component.scss']
|
||||
})
|
||||
export class PermissionsComponent implements OnInit {
|
||||
export class PermissionsComponent implements OnInit, OnChanges {
|
||||
|
||||
datetimeformat: String;
|
||||
@Input() permissions;
|
||||
@ -16,7 +16,11 @@ export class PermissionsComponent implements OnInit {
|
||||
constructor(private i18n: I18nService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.sortData({ "active": "name", "direction": "asc" });
|
||||
this.datetimeformat = this.i18n.get('format.datetime', []);
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.sortData({ "active": "name", "direction": "asc" });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user