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

Commit3cf48bf

Browse files
committed
fix(sidebar-nav): role="navigation"
1 parent3156663 commit3cf48bf

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

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

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,23 @@ import { IconDirective } from '@coreui/icons-angular';
5252
],
5353
animations:[
5454
trigger('openClose',[
55-
state('open',style({
56-
height:'*'
57-
})),
58-
state('closed',style({
59-
height:'0px'
60-
})),
61-
transition('open <=> closed',[
62-
animate('.15s ease')
63-
])
55+
state(
56+
'open',
57+
style({
58+
height:'*'
59+
})
60+
),
61+
state(
62+
'closed',
63+
style({
64+
height:'0px'
65+
})
66+
),
67+
transition('open <=> closed',[animate('.15s ease')])
6468
])
6569
]
6670
})
6771
exportclassSidebarNavGroupComponentimplementsOnInit,OnDestroy{
68-
6972
constructor(
7073
privaterouter:Router,
7174
privaterenderer:Renderer2,
@@ -102,7 +105,6 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
102105
publicdisplay:any={display:'block'};
103106

104107
ngOnInit():void{
105-
106108
this.navItems=[...this.item.children];
107109

108110
this.navSubscription=this.navigationEndObservable.subscribe((event:NavigationEnd)=>{
@@ -116,7 +118,7 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
116118
this.openGroup(true);
117119
}
118120

119-
this.navGroupSubscription=this.sidebarNavGroupService.sidebarNavGroupState$.subscribe(next=>{
121+
this.navGroupSubscription=this.sidebarNavGroupService.sidebarNavGroupState$.subscribe((next)=>{
120122
if(this.dropdownMode==='close'&&next.sidebarNavGroup&&next.sidebarNavGroup!==this){
121123
if(next.sidebarNavGroup.item.url.startsWith(this.item.url)){
122124
return;
@@ -194,15 +196,14 @@ export class SidebarNavGroupComponent implements OnInit, OnDestroy {
194196
]
195197
})
196198
exportclassSidebarNavComponentimplementsOnChanges{
197-
198199
constructor(
199200
@Optional()publicsidebar:SidebarComponent,
200201
publichelper:SidebarNavHelper,
201202
publicrouter:Router,
202203
privaterenderer:Renderer2,
203204
privatehostElement:ElementRef,
204205
privatesidebarService:SidebarService
205-
){}
206+
){}
206207

207208
@Input()navItems?:INavData[]=[];
208209
@Input()dropdownMode:'path'|'none'|'close'='path';
@@ -223,7 +224,9 @@ export class SidebarNavComponent implements OnChanges {
223224
// return !!this.groupItems;
224225
// }
225226

226-
@HostBinding('attr.role')role='nav';
227+
@HostBinding('attr.role')
228+
@Input()
229+
role='navigation';
227230

228231
publicnavItemsArray:INavData[]=[];
229232

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp