Browserify heart angular

Browserify heart angular The problem You probably have a project structure looking something like this. Project structure app.js /infrastructure /login /notification /interceptors /features /user /products /projects /… /vendor /resources And more importantly an index.html file looking like this <body> … <script src=”infrasctructure/login/login.js”></script> . . . <script src=”features/login/login.js”></script> . . . // vendor <script src=”bower_components/angular/angular.min.js”></script> . … More Browserify heart angular

Angular directives part II , decorating directives

Attribute Directives So far I have been talking about element directives and the three different modes through which you can pass data. Attribute directives is built on the same principles of course but their application is different. Attribute directives are decorator directives and therefore we will look at situations where ‘elements’ or even other ‘element … More Angular directives part II , decorating directives

Angular directives

Directives First directive Declaration angular.module(‘app’).directive(‘testDir’,function(){ return { restrict : ‘E’, replace : true, transclude : true, template : ‘<h1>test</h1>’ } }) Usage <test-dir></test-dir> Casing matters: testDir becomes test-dir in view Restrict What can it be applied to: Comments Elements, E Attributes, A CSS Replace Determines wether the custom element is being replaced with view content … More Angular directives