Closed ghost closed 7 years ago
When templating in Angular do you prefer to;
angular .module('app.directives') .directive('sideNav', [ '$mdSidenav', function( $mdSidenav ) { return { templateUrl: 'scripts/directives/sidenav/sidenav.html', link: function(scope, element, attrs, ngModel) { scope.lockLeft = true; } } } ])
or
angular .module('app.directives') .directive('sideNav', [ '$mdSidenav', function( $mdSidenav ) { return { template: ` <aside> <h2></h2> </aside> `, link: function(scope, element, attrs, ngModel) { scope.lockLeft = true; } } } ])
Personally I've always preferred to use templateUrl because it adds to cleaner code output.
Would like your offerings
Personally I prefer template, demo here using components:
template
https://jsfiddle.net/toddmotto/kpvqf9gf/
When templating in Angular do you prefer to;
or
Personally I've always preferred to use templateUrl because it adds to cleaner code output.
Would like your offerings