javascript - How to use AngularJS to make these two sections repeat? -
i trying make 2 sections in html repeat itself. first section supposed repeat twice , second section supposed repeat 4 times.
here second section in particular looks like(i want repeat 4 times)
here current progress - fiddle( wo angular js applied second) , fiddle 2(w angularjs). got first section repeat twice when apply repeat directive second section, second section disappears....
to accomplish both tasks, used angularjs ng-repeat directive. made sure bootstrap or initialize angular app once in outer div contains both sections. followed syntax objects group data in javascript. haven't read says can't have more 1 ng-init(i used 2 initialize data 2 sections)
<div id="rest_contents" data-ng-app=""> .....
does see issue syntax or did wrong?
check console log, there syntax error sections list definition. have pictorial=
should pictorial:
<div data-ng-init="sections=[{title: 'campaign', pictorial:'campaign.png'}, {title: 'tv ads', pictorial:'tv_adds.png'} , {title:'video archive',pictorial: 'video_archive.png'}, {title: 'house showcases', pictorial: 'house_showcases.png'}]" >
Comments
Post a Comment