From cec0efe9ebfbaf8bfcd3b782d119caaeecf580a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merve=20=C3=96z=C3=A7if=C3=A7i?= Date: Tue, 20 Feb 2018 09:27:58 +0300 Subject: [PATCH] Fixed #5180 --- src/app/components/common/menuitem.ts | 1 + src/app/components/menu/menu.ts | 14 +++++++------- src/app/components/menubar/menubar.ts | 4 ++-- .../components/menumodel/menumodeldemo.html | 14 ++++++++++---- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/app/components/common/menuitem.ts b/src/app/components/common/menuitem.ts index 8ac2f0345f0..1d46f24bca7 100644 --- a/src/app/components/common/menuitem.ts +++ b/src/app/components/common/menuitem.ts @@ -20,4 +20,5 @@ export interface MenuItem { styleClass?:string; title?: string; id?: string; + automationId?: any; } diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index 0b6e0edd8d1..e4d78dd051a 100644 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -7,12 +7,12 @@ import {RouterModule} from '@angular/router'; @Component({ selector: '[pMenuItemContent]', template: ` - {{item.label}} - @@ -23,19 +23,19 @@ import {RouterModule} from '@angular/router'; export class MenuItemContent { @Input("pMenuItemContent") item: MenuItem; - + constructor(@Inject(forwardRef(() => Menu)) public menu: Menu) {} } @Component({ selector: 'p-menu', template: ` -
- +

Command

The function to invoke when an item is clicked is defined using the command property.

 
 export class MenuDemo {
-    
+
     private items: MenuItem[];
 
     ngOnInit() {
@@ -208,7 +214,7 @@ 

Navigation

 
 export class MenuDemo {
-    
+
     private items: MenuItem[];
 
     ngOnInit() {