The example above demonstrated a controller object with two properties: lastName and firstName. To learn more, see our tips on writing great answers. Angular is a well known framework made for building web applications. Unlike directives, only one component can be instantiated for a given element in a template. selector: "[buttonClick]", The various different directives can be used in a DOM as per the requirement. And Finally use the angular pipe transform method & pass the required parameters according to pipe defination to format the values. AngularJS Controllers. . For your issue, I solved by changing the first called script (inline in html) to: var app = angular.module ('App', ['ngMaterial']); Then I used this variable instead of redefining a new module each time : (function (app) { // controller or component here } (app)); This did the trick, however this migth be some more . How can I get a huge Saturn-like ringed moon in the sky? The Angular 2 uses Hierarchical Dependency Injection . Angular 2 is mobile oriented and better in performance; Angular 1 was introduced long ago and was not built with mobile support in mind, whereas, being introduced in the current era, the Angular 2.0 comes features mobile support.. . What is the difference between '@' and '=' in directive scope in AngularJS? Just copy the code between the