Nested ng repeat not working
Posted
by
Rodrigo Fonseca
on Stack Overflow
See other posts from Stack Overflow
or by Rodrigo Fonseca
Published on 2014-06-03T15:23:06Z
Indexed on
2014/06/03
15:24 UTC
Read the original article
Hit count: 281
angularjs
Ok, i've two ng-repeat working here, the first(board in boards) is working good, no problem, but the second(task in tasks), when i try to get "{{task.title}}" i don't get anything but i can display all the style from it...
here is my model:
$scope.tasks = [{boardIndex: 0, title: "test"}, {boardIndex: 1, title: "test2"}];
Here is my code(it's in jade, ok?)
section(data-ng-repeat="board in boards", ng-cloak)
.board_header
div(data-ng-controller="AddTaskBtnController")
i.add_task_btn.fa.fa-plus-square-o.fa-2x(ng-click='setSelected(board.id)', ng-class="{icon_add_hover: isSelected(board.id)}")
h2(data-ng-bind="board.title")
.content_board
.task(data-ng-repeat="task in tasks", data-ng-if="task.boardIndex == board.id", data-ng-controller='TaskController', data-ng-hide='modeTask', data-ng-init='setTaskId()')
.user_icon_task
i.fa.fa-user.fa-3x.icon-user-not-selected
.quest_task
.puzzle_task(data-ng-hide='modeTask')
i.fa.fa-check-circle-o.fa-lg
h2 {{task.title}}
ul.icons_details_task_wrapper
li
i.fa.fa-check-circle-o
span.icon_counter
li.pull_left
i.fa.fa-puzzle-piece
span.icon_counter
ul.task_details_wrapper
li.task_priority(data-ng-show='goal.selectedDrawAttention', data-ng-click='toggleSelected()', data-ng-class='{draw_attention_selected: goal.selectedDrawAttention }', style='cursor: inherit;')
i.fa.fa-eye
li.task_priority
i.fa
.task_time_ago
span(am-time-ago='message.time')
© Stack Overflow or respective owner