mongoDB 多重数组查询(AngularJS绑定显示 nodejs)
程序员文章站
2022-06-22 18:10:58
核心代码:
js代码
var lesson = schema({
lessonname: string,
intr: string,
c...
核心代码:
js代码
var lesson = schema({ lessonname: string, intr: string, cretime: date, sort: string, //分类 imgurl: string, //封面地址 price: number, teacher: string,//教师 subtitle:[{ lno: number, sublname: string, src: string, filtered: {type: boolean, default: false} }] });
我的html代码
<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" >课时{{title.lno}}:{{title.sublname}}</a> </li> </ul>
lessoninfo为angularjs接收到后台传过来的数据数组