isaacplmann / ngx-contextmenu

An Angular component to show a context menu on an arbitrary component
MIT License
248 stars 91 forks source link

separator/divider #2

Closed isaacplmann closed 7 years ago

isaacplmann commented 7 years ago

From @gjenner on March 21, 2017 15:23

is it possible to add a divider (or separator) in code rather than HTML?

Copied from original issue: isaacplmann/angular2-contextmenu#58

isaacplmann commented 7 years ago

Kind of, I updated the linked comment to show how to use a dynamic data in code to update the html template. I think that html should stay in templates.

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 14:24

Thank you, I have been able to populate in code-behind, but the example of divider does not seem to work. It allocates the space, but does not show the divider, and is selectable.

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:15 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Kind of https://github.com/isaacplmann/angular2-contextmenu/issues/15#issuecomment-252943752 , I updated the linked comment to show how to use a dynamic data in code to update the html template. I think that html should stay in templates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289033841 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHQfSZpJh-S0dq5N-rXdDHKrpQnotks5ro8_fgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHbVqK5kMC_kQ3z4LHycius9_YShBks5ro8_fgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

I guess I’ll have to actually test my code sample before sharing it. I’ll having a working example for you soon.

On Mar 24, 2017, at 10:24 AM, gjenner notifications@github.com wrote:

Thank you, I have been able to populate in code-behind, but the example of divider does not seem to work. It allocates the space, but does not show the divider, and is selectable.

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:15 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Kind of https://github.com/isaacplmann/angular2-contextmenu/issues/15#issuecomment-252943752 , I updated the linked comment to show how to use a dynamic data in code to update the html template. I think that html should stay in templates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289033841 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHQfSZpJh-S0dq5N-rXdDHKrpQnotks5ro8_fgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHbVqK5kMC_kQ3z4LHycius9_YShBks5ro8_fgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289036542, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQOy7GLpbOGmHAc5RIqQPoBfxXGZSks5ro9IggaJpZM4Mj-Fg.

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 14:38

Thank you so much

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:32 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

I guess I’ll have to actually test my code sample before sharing it. I’ll having a working example for you soon.

On Mar 24, 2017, at 10:24 AM, gjenner notifications@github.com wrote:

Thank you, I have been able to populate in code-behind, but the example of divider does not seem to work. It allocates the space, but does not show the divider, and is selectable.

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:15 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Kind of https://github.com/isaacplmann/angular2-contextmenu/issues/15#issuecomment-252943752 , I updated the linked comment to show how to use a dynamic data in code to update the html template. I think that html should stay in templates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289033841 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHQfSZpJh-S0dq5N-rXdDHKrpQnotks5ro8_fgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHbVqK5kMC_kQ3z4LHycius9_YShBks5ro8_fgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289036542, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQOy7GLpbOGmHAc5RIqQPoBfxXGZSks5ro9IggaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289038551 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHZAC9X2se8VV-RWdw9WTlf1PLF2gks5ro9PEgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHdgBpkna6gQ645OsOm761ktzj5sbks5ro9PEgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

I just updated the demo code in the repo to create a divider like in the linked comment. It's working in the demo. What version of bootstrap are you using? Can you show me what the rendered html looks like when the divider doesn't show correctly? Did you add [divider]="action.divider" to the contextMenuItem?

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 14:51

OK, a couple of challenges

  1. My HTML is just , as I push everything in code-behind (I am old school that way)

  2. When I do add an empty <template [divider]=”action.divider”>, I get ‘divider’ is not a known property of ‘template’

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:41 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

I just updated the demo code in the repo to create a divider like in the linked comment. It's working in the demo. What version of bootstrap are you using? Can you show me what the rendered html looks like when the divider doesn't show correctly? Did you add [divider]="action.divider" to the contextMenuItem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289041291 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHSgNgyCShnHXqcQ1ZSZClU7S0de0ks5ro9XugaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHRIGvmJbVg1fmFVaV8xeSahnV0uPks5ro9XugaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

You need to add the contextMenuItem directive to the template element.

<template contextMenuItem [divider]=”action.divider”></template>
isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 14:58

Thank you for your patience. Cannot read property ‘divider’ pf undefined

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 10:53 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

You need to add the contextMenuItem directive to the template element.

<template contextMenuItem [divider]=”action.divider”>

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289044770 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHQwdVBSdTp3sYjDo19hm4tfA55Lgks5ro9jAgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHQh3dIfbipP8_wwu84dFm19PE3-kks5ro9jAgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

That means that action is undefined. You could statically set [divider]="true" or use all the example code:

<ul>
    <li *ngFor="item in items" [contextMenu]="contextMenu" [contextMenuSubject]="item">Right Click: {{item.name}}</li>
</ul>
<context-menu>
  <template *ngFor="let action of contextMenuActions" contextMenuItem let-item
    [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider"
    (execute)="action.execute($event.item)">
    {{ action.html(item) }}
  </template>
</context-menu>
@Component({
  ...
})
export class MyContextMenuClass {
  public items = [
      { name: 'John', otherProperty: 'Foo' },
      { name: 'Joe', otherProperty: 'Bar' }
  };
  @ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent;
  public contextMenuActions = [
        {
          html: (item) => `Say hi!`,
          click: (item) => alert('Hi, ' + item.name)
          enabled: (item) => true,
          visible: (item) => item.type === 'type1',
        },
        {
          divider: true,
          visible: true,
        },
        {
          html: (item) => `Something else`,
          click: (item) => alert('Or not...'),
          enabled: (item) => false,
          visible: (item) => item.type === 'type1',
        },
      ];
}
isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 15:15

Just so close. I just find all of the data logic in HTML difficult to debug. I added the [divider]=”true”, [visible]=”true” [enabled]=”true”

My items are now not visible

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:01 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

That means that action is undefined. You could statically set [divider]="true" or use all the example code:

@Component({ ... }) export class MyContextMenuClass { public items = [ { name: 'John', otherProperty: 'Foo' }, { name: 'Joe', otherProperty: 'Bar' } }; @ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent; public contextMenuActions = [ { html: (item) => Say hi!, click: (item) => alert('Hi, ' + item.name) enabled: (item) => true, visible: (item) => item.type === 'type1', }, { divider: true, visible: true, }, { html: (item) => Something else, click: (item) => alert('Or not...'), enabled: (item) => false, visible: (item) => item.type === 'type1', }, ]; }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289047401 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHYmiXtzk2AirgrdM_ByOqxE4G72uks5ro9rJgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHa5SVmqslYncK6-YIV9zqvjLzB7Nks5ro9rJgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

Can you post your entire html snippet?

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 15:30

Made item [visible]=>true, fixed that, but still no visible divider and it is selectable, sorry

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:01 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

That means that action is undefined. You could statically set [divider]="true" or use all the example code:

@Component({ ... }) export class MyContextMenuClass { public items = [ { name: 'John', otherProperty: 'Foo' }, { name: 'Joe', otherProperty: 'Bar' } }; @ViewChild(ContextMenuComponent) public contextMenu: ContextMenuComponent; public contextMenuActions = [ { html: (item) => Say hi!, click: (item) => alert('Hi, ' + item.name) enabled: (item) => true, visible: (item) => item.type === 'type1', }, { divider: true, visible: true, }, { html: (item) => Something else, click: (item) => alert('Or not...'), enabled: (item) => false, visible: (item) => item.type === 'type1', }, ]; }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289047401 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHYmiXtzk2AirgrdM_ByOqxE4G72uks5ro9rJgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHa5SVmqslYncK6-YIV9zqvjLzB7Nks5ro9rJgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

Don't apologize, you're helping me make the library more robust. But I do need more of your code to help diagnose the problem.

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 15:50

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:39 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Don't apologize, you're helping me make the library more robust. But I do need more of your code to help diagnose the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289058413 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHQDTsvlLI9lWmEr1scSPMFYjFlKtks5ro-ObgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHXNvdQeR9IQt1tzrkguJmKzGliEnks5ro-ObgaJpZM4Mj-Fg.gif

.angular2-contextmenu .dropdown-menu { border: solid 1px #aaa; // background-color: #fff; background-color: #fff; padding: 0; }

.angular2-contextmenu li { display: block; // border-top: solid 1px #bbb; text-align: left; height: 28px; }

.angular2-contextmenu li:first-child { border-top: none; }

.angular2-contextmenu a { color: #000; display: block; padding: 0.5em 1em; }

.angular2-contextmenu a:hover { color: #000; background-color: #ddd; }

ul.dropdown-menu { position: fixed; display: block; left: 0px; top: 0px; }

.dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: no; background-color: #eee; }

if (this.objAppointmentSelectedResult.AppointmentDetailID !== 0) { for (let i = 0; i < this.objApptStatuses.length; i++) { //ToDo need to include ID let cd: CodeDescription = new CodeDescription; cd.Code = eventData.colDef.field; cd.Description = this.objApptStatuses[i].Description; cd.IDENTITY = this.objApptStatuses[i].AppointmentStatusTypeID; let cmMenuItem: any = {}; cmMenuItem = { html: () => cd.Description, visible: () => true, click: () => { // console.log(cd, $event); // alert(cd.Description); this.ContextMenuItemSelected(eventData.colDef.field, cd); } }; this.cmMenuItems.push(cmMenuItem); if (i == 3) { let cmDivider: any = { divider: () => true, visible: () => true, enabled: () =>true }; this.cmMenuItems.push(cmDivider); let cmDivider2: any = { divider: () => true, visible: () => true, enabled: () =>true }; this.cmMenuItems.push(cmDivider2); }; }; };

isaacplmann commented 7 years ago

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew>
  <template *ngFor="let action of cmMenuItems" contextMenuItem let-item
    [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider"
    (execute)="action.execute($event.item)">
    {{ action.html(item) }}
  </template>
</context-menu>
isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 16:20

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 16:30

Each object is

click: ()

divider: ()

enabled: ()

html: ()

visible: ()

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 16:39

Missed part of my previous code behind

if (this.cmMenuItems.length !== 0) {

  this.contextMenuService.show.next({

    // Optional - if unspecified, all context menu components will open

    contextMenu: this.cmNew,

    actions: this.cmMenuItems,

    event: me,

    item: this.objAppointmentSelectedResult,

  });

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 16:39

This all worked well, except for the divider

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

Just remove the actions property of the this.contextMenuService.show call. You’re already specifying the actions in the html template.

this.contextMenuService.show.next({ // Optional - if unspecified, all context menu components will open contextMenu: this.cmNew, event: me, item: this.objAppointmentSelectedResult, });

On Mar 24, 2017, at 12:39 PM, gjenner notifications@github.com wrote:

This all worked well, except for the divider

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289075548, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQDi2Gmovsm1yloJung-1SSy_7II7ks5ro_HXgaJpZM4Mj-Fg.

isaacplmann commented 7 years ago

From @gjenner on March 24, 2017 17:45

It would not even display when I did that

I do appreciate your valuable time, but I am going to revert to where I was this morning and revisit it another day, but again, thank you

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 1:32 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Just remove the actions property of the this.contextMenuService.show call. You’re already specifying the actions in the html template.

this.contextMenuService.show.next({ // Optional - if unspecified, all context menu components will open contextMenu: this.cmNew, event: me, item: this.objAppointmentSelectedResult, });

On Mar 24, 2017, at 12:39 PM, gjenner notifications@github.com wrote:

This all worked well, except for the divider

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289075548, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQDi2Gmovsm1yloJung-1SSy_7II7ks5ro_HXgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289090267 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHRVSi9NunUapoW8hVtALtS79H13vks5ro_4qgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHbh-OqxpH8o_JnYzFXt6mGC2JxPIks5ro_4qgaJpZM4Mj-Fg.gif

isaacplmann commented 7 years ago

Ok. You’re welcome. Let me know if you want to give it a try again.

On Mar 24, 2017, at 1:46 PM, gjenner notifications@github.com wrote:

It would not even display when I did that

I do appreciate your valuable time, but I am going to revert to where I was this morning and revisit it another day, but again, thank you

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 1:32 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Just remove the actions property of the this.contextMenuService.show call. You’re already specifying the actions in the html template.

this.contextMenuService.show.next({ // Optional - if unspecified, all context menu components will open contextMenu: this.cmNew, event: me, item: this.objAppointmentSelectedResult, });

On Mar 24, 2017, at 12:39 PM, gjenner notifications@github.com wrote:

This all worked well, except for the divider

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 12:23 PM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Do a console.log of your cmMenuItems and check if there’s an item in the array that is null.

On Mar 24, 2017, at 12:20 PM, gjenner notifications@github.com wrote:

This was working great, except the divider, now back to “cannot read property ‘divider’ of undefined

And since it is in HTML, cannot debug easily. Not a fan of HTML, my last program was Silverlight, loved it

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Friday, March 24, 2017 11:57 AM To: isaacplmann/angular2-contextmenu Cc: gjenner; Author Subject: Re: [isaacplmann/angular2-contextmenu] separator/divider (#58)

Your html template should create a contextMenuItem for each item in the cmMenuItems array using *ngFor. Like this:

<context-menu #cmNew> <template *ngFor="let action of cmMenuItems" contextMenuItem let-item [visible]="action.visible" [enabled]="action.enabled" [divider]="action.divider" (execute)="action.execute($event.item)"> {{ action.html(item) }}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289063706 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHW_Lm0-UMiP726itXLH5-eRFypH4ks5ro-fTgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHV1i_HxXvSUPwU8y34QVfejoDdA-ks5ro-fTgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070423, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQMansUbaJ-jSIFE8ao1bIEHIfoCOks5ro-1pgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289070867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHcmhMTopUfj-Ag-9qjGT1hkmmyGNks5ro-3OgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHcAJREhPXA-Zr_umoNcMQle2iu3Aks5ro-3OgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289075548, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQDi2Gmovsm1yloJung-1SSy_7II7ks5ro_HXgaJpZM4Mj-Fg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289090267 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHRVSi9NunUapoW8hVtALtS79H13vks5ro_4qgaJpZM4Mj-Fg . https://github.com/notifications/beacon/AYwRHbh-OqxpH8o_JnYzFXt6mGC2JxPIks5ro_4qgaJpZM4Mj-Fg.gif

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289094646, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQKlBa-pBQXhU-zycI1ISvRvF2v-qks5rpAFXgaJpZM4Mj-Fg.

isaacplmann commented 7 years ago

From @symbyte on March 27, 2017 0:28

I feel like I'm experiencing something similar. Using I'm trying to use the following markup to place a divider in an already existing and functioning context menu:

    <template contextMenuItem divider="true"> </template>

At first, I was trying to use the attribute binding syntax ([divider]="true"), but was being given the angular template compiler error that divider isn't a known property of template. I then removed the brackets and am getting an empty, unstyled, anchor tag placed in the menu.

The rendered output of the divider:

<li>
  <a href="">
    <!--template bindings={}--> 
   </a>
</li>

and it looks like:

screen shot 2017-03-26 at 7 27 12 pm

Any Idea whats going on here?

isaacplmann commented 7 years ago

@symbyte using divider="true" will set the divider property to the string "true". Using [divider]="true" is correct. You'll get that template compiler error if you forget to include the contextMenuItem directive on the <template> element.

It should look like this:

<template contextMenuItem [divider]="true"></template>

Does that work?

isaacplmann commented 7 years ago

From @symbyte on March 28, 2017 13:9

As noted above, I did include the contextMenuItem directive on the template element. Here's the error message that angular produces:

zone.js:420 Unhandled Promise rejection: Template parse errors:
Can't bind to 'divider' since it isn't a known property of 'template'. ("
    </template>

    <template contextMenuItem [ERROR ->][divider]="true"></template>

    <template

I have, as far as I know, imported the module correctly because everything else works as expected.

Here is my full context menu section of the template for reference:


  <context-menu #contextMenu>
    <template
        contextMenuItem
        let-item
        (execute)="moveToTop($event)"
      >
      Send {{item?.label}} To Top
    </template>

    <template
        contextMenuItem
        let-item
        (execute)="moveToBottom($event)"
      >
      Send {{item?.label}} To Bottom

    </template>

    <template contextMenuItem [divider]="true"></template>

    <template
        contextMenuItem
        (execute)="showAll($event)"
      >
      Show All
    </template>

    <template
        contextMenuItem
        (execute)="hideAll($event)"
      >
      Hide All
    </template>

  </context-menu>
isaacplmann commented 7 years ago

Can you double check that you’re using a version of angular2-contextmenu that is greater than 0.6.0? Sometimes the node_modules folder is out of sync with the package.json and you have to either delete and reinstall or manually check the node_modules/angular2-contextmenu/package.json to see what version number it says.

Your code looks just like the demo code in the repo, so it should work...

On Mar 28, 2017, at 9:09 AM, Steven Chambers notifications@github.com wrote:

As noted above, I did include the contextMenuItem directive on the template element. the error message that angular produces:

zone.js:420 Unhandled Promise rejection: Template parse errors: Can't bind to 'divider' since it isn't a known property of 'template'. ("

<template contextMenuItem [ERROR ->][divider]="true"></template>

<template

I have, as far as I know, imported the module correctly because everything else works as expected.

Here is my full context menu section of the template for reference:

<context-menu #contextMenu> <template contextMenuItem let-item (execute)="moveToTop($event)"

Send {{item?.label}} To Top

<template
    contextMenuItem
    let-item
    (execute)="moveToBottom($event)"
  >
  Send {{item?.label}} To Bottom

</template>

<template contextMenuItem [divider]="true"></template>

<template
    contextMenuItem
    (execute)="showAll($event)"
  >
  Show All
</template>

<template
    contextMenuItem
    (execute)="hideAll($event)"
  >
  Hide All
</template>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/angular2-contextmenu/issues/58#issuecomment-289764167, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQKiXMBfkkT8LGlM4klyag-CfBxrSks5rqQajgaJpZM4Mj-Fg.

isaacplmann commented 7 years ago

From @symbyte on March 29, 2017 17:56

Ah yes. We have the library version locked to 0.5.3 because we were getting some strange behavior with where the menu would appear relative to the location of the click.

It seems that the same behavior is still present in the most recent release, so I'll open an issue on it in the next few days.

isaacplmann commented 7 years ago

@symbyte The positioning problems should be fixed with the move to 1.x. Let me know if it works for you.

isaacplmann commented 7 years ago

Closing.

gjenner commented 7 years ago

It appears your Demo at github is not working, just an FYI

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Tuesday, April 11, 2017 10:56 AM To: isaacplmann/ngx-contextmenu Cc: gjenner; Mention Subject: Re: [isaacplmann/ngx-contextmenu] separator/divider (#2)

Closing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-contextmenu/issues/2#issuecomment-293289867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHbL-ix-Hhyw0jfNaKjgO-oKpILXTks5ru5RsgaJpZM4MxgPP . https://github.com/notifications/beacon/AYwRHa8CO1ZNGPKXqM9FVcuFEKoEaocUks5ru5RsgaJpZM4MxgPP.gif

gjenner commented 7 years ago

Greetings, hoping all is well

So I am upgrading to angular 4, upgraded to ngx-contextmenu

If I use your example with the <ng-template… the menu appears correctly. If I use the <li *ngFor…, the list appears somewhere else on the page. Do you feel I am doing something obviously wrong?

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Tuesday, April 11, 2017 10:56 AM To: isaacplmann/ngx-contextmenu Cc: gjenner; Mention Subject: Re: [isaacplmann/ngx-contextmenu] separator/divider (#2)

Closing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-contextmenu/issues/2#issuecomment-293289867 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHbL-ix-Hhyw0jfNaKjgO-oKpILXTks5ru5RsgaJpZM4MxgPP . https://github.com/notifications/beacon/AYwRHa8CO1ZNGPKXqM9FVcuFEKoEaocUks5ru5RsgaJpZM4MxgPP.gif

isaacplmann commented 7 years ago

I'll need more information to diagnose your issue. Can you show me more of your template?

gjenner commented 7 years ago
<div >

<context-menu #cmNew>

<ng-template contextMenuItem (execute)="showMessage('Hi, ' + $event.item.name)">

  Say hi!

</ng-template>

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Thursday, April 13, 2017 10:20 AM To: isaacplmann/ngx-contextmenu Cc: gjenner; Mention Subject: Re: [isaacplmann/ngx-contextmenu] separator/divider (#2)

I'll need more information to diagnose your issue. Can you show me more of your template?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-contextmenu/issues/2#issuecomment-293909127 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHZwZ8waN2h31KFlzVYII6HfwOzdFks5rvi8PgaJpZM4MxgPP . https://github.com/notifications/beacon/AYwRHRTNjvJrDbqtHAmBxXFmpFpKRCfIks5rvi8PgaJpZM4MxgPP.gif

isaacplmann commented 7 years ago

Where does the context menu appear in the DOM (Elements tab in Chrome Dev tools) when it's open? It should be attached to the root app node.

gjenner commented 7 years ago

OK, in my code I have the HTML menu with the code behind

isaacplmann commented 7 years ago

I don't think email attachments make it through to the github issue. You'll either need to paste in the code or drag and drop the files into your reply from the github web ui.

gjenner commented 7 years ago

uploaded

Thank you in advance,

Geordie Jenner

Net Connect Healthcare Systems

www.ncpractice.com

From: isaacplmann [mailto:notifications@github.com] Sent: Thursday, April 13, 2017 11:00 AM To: isaacplmann/ngx-contextmenu Cc: gjenner; Mention Subject: Re: [isaacplmann/ngx-contextmenu] separator/divider (#2)

I don't think email attachments make it through to the github issue. You'll either need to paste in the code or drag and drop the files into your reply from the github web ui.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-contextmenu/issues/2#issuecomment-293920576 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYwRHXGGRqfDE39YyGNIgpAdeo7TzdiWks5rvjhcgaJpZM4MxgPP . https://github.com/notifications/beacon/AYwRHbNI4gNEawxQmfXHy947kD_ydZ6Hks5rvjhcgaJpZM4MxgPP.gif