USE OF DIRECTIVES
You can create a directive to simplify actions by nesting the contents of your client. demo
app.directive('repeatByWeek', function($parse, $window) { return {
Repeat.html template:
<ul> <li ng-repeat="week in weeks"> <h3>{{week.time | date:"MMMM dd'th'" }}</h3> <ul> <li ng-repeat="day in week.days"> <h4>{{day.time | date:"MMMM dd'th'" }}</h4> <ul> <li ng-repeat="task in day.items"> <input type="checkbox" ng-model="task.complete" ng-change="isCompleteTask(task)"> <input ng-model="task.title" ng-change="updateTask(task)"> <span ng-click="deleteTask(task)">x</span> </li> </ul> </li> </ul> </li> </ul>
OTHER IDEAS
Most likely, you just need to push the changes from ng-init. I don't think this is re-execution when items are moved / resorted to.
<li ng-repeat="task in list"> <h3 ng-show="priorityChanged(task.$priority)">{{getDayName(task.$priority)}}</h3> </li>
Since your list can be resorted to several times, you can also get quite significant speedups using the track .
<li ng-repeat="task in list track by task.$id">
If this does not solve the problem, maybe it's time to think about writing your own directive (it's funnier than they sound) and maybe consider removing AngularFire and going straight to the source.
You really need a more deeply nested data structure here, you can iterate at several levels, and you may need to structure it yourself either on the client or on the server, now that you have an idea of ββhow you want them to be organized (essentially the functionality of the group per week).
source share