mongoDB multiple array query of AngularJS binding displays nodejs
- 2020-06-12 10:53:51
- OfStack
Core code:
js code
var Lesson = Schema({
lessonName: String,
intr: String,
creTime: Date,
sort: String, // classification
imgUrl: String, // Cover the address
price: Number,
teacher: String,// Teachers'
subTitle:[{
lNo: Number,
subLName: String,
src: String,
filtered: {type: Boolean, default: false}
}]
});
My HTML code
<ul class="menu fl">
<li ng-repeat="title in lessonInfo.subTitle" ng-hide="{{!title.filtered}}"><a ng-href="showVideo?lessonName={{lessonInfo.lessonName}}&lessonNo={{title.lNo}}&lesId={{lesId}}&subLName={{title.subLName}}" rel="external nofollow" > class {{title.lNo}}:{{title.subLName}}</a> </li>
</ul>
lessonInfo receives an array of data passed in the background for AngularJS