feat: convert NavItem to class

pull/4820/head
Arman Ozak 5 years ago
parent 7ea54cdb1b
commit c2662d8442

@ -1,6 +1,6 @@
import { Type } from '@angular/core';
export interface NavItem {
export class NavItem {
id: string | number;
component?: Type<any>;
html?: string;
@ -8,4 +8,8 @@ export interface NavItem {
order?: number;
requiredPolicy?: string;
visible?: () => boolean;
constructor(props: Partial<NavItem>) {
props = { ...props, visible: props.visible || (() => true) };
Object.assign(this, props);
}
}

Loading…
Cancel
Save