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

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -