JavaScript Angular 2 passing a click event to a reusable generic component angular passing click event

Angular2 as far as I know will not bind to a "(click)" event that way. It may look ugly, but I would add the NgIf directive to the table on the row that the click event should act upon, and inversely apply the logic to another row that should not be affected by a click event. Ex:

<tr *ngIf="!isClickable" class="someClass"> <tr *ngIf="isClickable" class="someClass" (click)="rowClicked()> <td *ngFor="let column of row;"><div [innerHtml]="column"></div></td> </tr>

Then you can pass the isClickable variable as an input into your table from anywhere that you instantiate the table component, and act upon it.

Answer:1

I'm getting an unusual error: ctx_wrap.fillStyle is not a function on this line: ctx_wrap.fillStyle('#b8b8b8'); in here: ... this.paint = function() { self.path(ctx_wrap); if (!isOver) {...

I'm getting an unusual error: ctx_wrap.fillStyle is not a function on this line: ctx_wrap.fillStyle('#b8b8b8'); in here: ... this.paint = function() { self.path(ctx_wrap); if (!isOver) {...

What happens when you do npm install in a dev environment on a project that has both a package.json and a npm-shrinkwrap.json file? Will it ignore the shrinkwrap and use package.json for everything or ...

What happens when you do npm install in a dev environment on a project that has both a package.json and a npm-shrinkwrap.json file? Will it ignore the shrinkwrap and use package.json for everything or ...

  1. shrinkwrap developmental psychology with connect

I have a problem with react components and props. Here's exception below. What I'm doing wrong? Uncaught TypeError: Super expression must either be null or a function, not undefined class ...

I have a problem with react components and props. Here's exception below. What I'm doing wrong? Uncaught TypeError: Super expression must either be null or a function, not undefined class ...

  1. typeerror super expression must either be null
  2. typeerror super expression must either be null or a function
  3. × typeerror super expression must either be null or a function

I need to add a .trash class to every element inside a .secondary-images div, except for one .field--name-rd-page-secondary-image div. I have tried this. $('.secondary-images *').addClass('trash')....

I need to add a .trash class to every element inside a .secondary-images div, except for one .field--name-rd-page-secondary-image div. I have tried this. $('.secondary-images *').addClass('trash')....