For frontend developers, the days when you manually linked css files to your index.html are over. Modern workflows needs some compilation steps before having a css file that can be use in development or production. Most notably, sass has become the most important language that extends css functionalities, while gulp has won the battle on the building tools front. Continue reading Working with Sass, Bootstrap and Gulp
In a previous post I showed how to create a “classic” inheritance model in AngularJS using directives. This time I will show another inheritance model: the abstract/concrete.
In OOP, an abstract class cannot be instantiated, it serves only to provide common properties and functionality to child classes. In Angular, we have to make an analogy and define that an abstract directive is one that does not have a template or a link function, only a controller. The template is provided by child directives.
Inheritance is a powerful way to extend directives functionality and at the same time, improve code reuse. Lets see how it works in Angular with a simple example. The first step is to create a directive called “outer” which is going to be our top-level directive in our hierarchy.