In Angular 2, we are used to listening for events on the Component’s DOM elements, however how do we listen to events outside of this range? Two ways to do this: Creating a Host Listener Using the Component’s host property
Posts in category Ionic 2
Transclusion was one of the coolest feature of Angular 1. Angular 2 made this (way) more simple and also changed its name to Projection. What we used to configure in our directives with some symbols and ngTransclude is now directly handled into the DOM. Before diving into it, let’s refresh our memory. Here is the most basic Projection example: We pass some […]
When it comes to Web Development, Animations can make or break your UX. Too much of them and your website looks like a Vegas Casino. None and your website will be missing the little spark to make it stand out. Angular has made some great improvement in this domain since version 1.3 so let’s see what Angular 2 offers!
One very important feature wasn’t listed yet, the possibility to add some nodes! Let’s do this! First we will add a very beautiful icon in the tree-node.html: In tree-node.component we create the function addNewNode. Very simple, using the spread operator we recreate the subNodes of the node that we passed and push at the end a new node that is created using […]