Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf3d201

Browse files
committed
refactor(app-sidebar-nav): minor changes
1 parent9f07c82 commitdf3d201

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

‎projects/coreui/angular/src/lib/sidebar/app-sidebar-nav.component.ts‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import{Component,Directive,ElementRef,HostBinding,HostListener,Input,OnInit,Renderer2}from'@angular/core';
1+
import{
2+
Component,
3+
Directive,
4+
ElementRef,
5+
HostBinding,
6+
HostListener,
7+
Input,
8+
OnChanges,
9+
OnInit,
10+
Renderer2,
11+
SimpleChanges
12+
}from'@angular/core';
213
import{Replace}from'../shared';
314

415
@Directive({
@@ -84,12 +95,14 @@ export class LinkAttributesDirective implements OnInit {
8495
</ng-template>
8596
</ul>`
8697
})
87-
exportclassAppSidebarNavComponent{
88-
@Input()navItems:any;
98+
exportclassAppSidebarNavComponentimplementsOnChanges{
99+
@Input()navItems:Array<any>;
89100

90101
@HostBinding('class.sidebar-nav')true;
91102
@HostBinding('attr.role')role='nav';
92103

104+
publicnavItemsArray:Array<any>;
105+
93106
publicisDivider(item){
94107
returnitem.divider ?true :false;
95108
}
@@ -98,6 +111,10 @@ export class AppSidebarNavComponent {
98111
returnitem.title ?true :false;
99112
}
100113

114+
publicngOnChanges(changes:SimpleChanges):void{
115+
this.navItemsArray=JSON.parse(JSON.stringify(this.navItems));
116+
}
117+
101118
constructor(){}
102119
}
103120

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp