angularjs - How to insert a new line inside a directive template in angular.js? -
hi know easy question how can insert new line in directive template? have long template. , hard me scan through horizontally. want have in new line. angular doesn't want.
app.directive('broadcasted', function(){ return{ restrict: 'eac', // new line template not in single line template: '<div class="alert alert-success col-md-6" ng-repeat="x in bcards"><strong class="broadcast-text" ><% x.q_number %> - <% x.teller_id %></strong></div>', link: function($scope){ } }; });
how this:
app.directive('broadcasted', function(){ return{ restrict: 'eac', // new line template not in single line template: '<div class="alert alert-success col-md-6" ng-repeat="x in bcards">' + '<strong class="broadcast-text" >' + '<% x.q_number %> - <% x.teller_id %></strong></div>', link: function($scope){ } };
there's way described here: creating multiline strings in javascript
Comments
Post a Comment