<div ng-repeat="d in data" ng-if="data.length>0">
<div ng-bind="d.aa"></div>
<div ng-bind="d.bb"></div>
<div ng-if="d.test == 'true'">
<div ng-bind="it's test" />
</div>
</div>
</div>
内容:
请帮助
答案 0 :(得分:4)
var websocketExtensions = _.once(function () {
var extensions = [];
var websocketCompressionConfig = process.env.SERVER_WEBSOCKET_COMPRESSION
? JSON.parse(process.env.SERVER_WEBSOCKET_COMPRESSION) : {};
if (websocketCompressionConfig) {
extensions.push(Npm.require('permessage-deflate').configure(
websocketCompressionConfig
));
}
return extensions;
});
你也可以使用
<div ng-repeat = "data in comments">
<div ng-if="data.length >0">
//different template with 0 data
</div>
<div ng-if="data.type == 'story' ">
//different template with story data
</div>
<div ng-if="data.type == 'article' ">
//different template with article data
</div>
</div>