Click event in ng2-dragula bag not working

Issue I’m using Angular 2 and ng2-dragula. I want to make the drag ‘n’ drop items in a dragula bag clickable. This is my app.component.html: <div id=”rootFrame”> <div class=”tasksFrame”> <div id=”tasksCont” class=’container’ [dragula]='”first-bag”‘> <div (click)=”onClick(‘ha’)”>Task 1</div> <div (click)=”onClick(‘ba’)”>Task 2</div> <div

Continue reading

How to fix ERROR Uncaught (in promise): Error: Cannot match any routes when clicking on row with navigation in Material Angular table?

Issue A Material Angular table lists items (events as in "volunteering events"). Following https://careydevelopment.us/blog/angular-material-tables-how-to-make-clickable-rows-that-take-users-to-a-new-route, I implemented a function, "getEventDetail", meant to allow to navigate to a detail page when a row in the list table is clicked. But console returns

Continue reading

ToggleClass('active') on Angular and Typescript

Issue Anyone knows how can I do something like this with Angular? $(‘button’).click(function(){ $(‘button’).toggleClass(‘active’); $(‘.title’).toggleClass(‘active’); $(‘nav’).toggleClass(‘active’); }); Thank you very much! Solution You can use something like this([class.className]=”conditionThatResolvesToABoolean”, or [ngClass]) for doing this: <div [class.active]=”classApplied”> Here’s some text <button (click)=”toggleClass()”>Toggle

Continue reading