|
|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
|