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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -