admin管理员组文章数量:1391798
I am using Grid List(dynamic tiles) in angularJS and using <br/>
tag but it is not working
Here is the code
<div ng-controller="gridListDemoCtrl as vm" flex="" ng-cloak="" class="gridListdemoDynamicTiles" ng-app="MyApp">
<md-grid-list md-cols="1" md-cols-sm="2" md-cols-md="3" md-cols-gt-md="6" md-row-height-gt-md="1:1" md-row-height="4:3" md-gutter="8px" md-gutter-gt-sm="4px">
<md-grid-tile ng-repeat="tile in pData" md-rowspan="{{tile.span.row}}" md-colspan="{{tile.span.col}}" md-colspan-sm="1" md-colspan-xs="1" ng-class="tile.background">
{{tile.systemName}}<br>
{{tile.createduser}}
</md-grid-tile>
</md-grid-list>
</div>
I am using <br>
tag after {{tile.systemName}} but it is not working
I am using Grid List(dynamic tiles) in angularJS and using <br/>
tag but it is not working
Here is the code
<div ng-controller="gridListDemoCtrl as vm" flex="" ng-cloak="" class="gridListdemoDynamicTiles" ng-app="MyApp">
<md-grid-list md-cols="1" md-cols-sm="2" md-cols-md="3" md-cols-gt-md="6" md-row-height-gt-md="1:1" md-row-height="4:3" md-gutter="8px" md-gutter-gt-sm="4px">
<md-grid-tile ng-repeat="tile in pData" md-rowspan="{{tile.span.row}}" md-colspan="{{tile.span.col}}" md-colspan-sm="1" md-colspan-xs="1" ng-class="tile.background">
{{tile.systemName}}<br>
{{tile.createduser}}
</md-grid-tile>
</md-grid-list>
</div>
I am using <br>
tag after {{tile.systemName}} but it is not working
3 Answers
Reset to default 4For those using material.angular.io, this works
<mat-grid-tile>
<mat-card-content>
<h2>your title</h2>
<h4>your content</h4>
</mat-card-content>
</mat-grid-tile>
After searching a lot I finally found the answer,Actually a friend of mine helped me.I just needed to use <md-content>
tag then <br/>
tag works in there.
<md-grid-tile ng-repeat="tile in pData" md-rowspan="{{tile.span.row}}" md-colspan="{{tile.span.col}}" md-colspan-sm="1" md-colspan-xs="1" ng-class="tile.background">
<md-content>
<br/>{{tile.systemName}}
<br/>{{tile.createduser}}
</md-content>
</md-grid-tile>
I suggest you to put the variables into divs like this:
<md-grid-tile ng-repeat="tile in pData" md-rowspan="{{tile.span.row}}" md-colspan="{{tile.span.col}}" md-colspan-sm="1" md-colspan-xs="1" ng-class="tile.background">
<div>{{tile.systemName}}</div>
<div>{{tile.createduser}}</div>
</md-grid-tile>
本文标签: javascriptHow to use line break in GridList(dynamic tiles) in AngularJSStack Overflow
版权声明:本文标题:javascript - How to use line break in GridList(dynamic tiles) in AngularJS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744771834a2624386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论