{"action":"created","issue":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/266","labels_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/266/comments","events_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/266/events","html_url":"https://github.com/michaelbromley/angularUtils/issues/266","id":118580634,"number":266,"title":"ng-if not working correctly when inserted into element with dir-paginate","user":{"login":"DoGi114","id":3736223,"avatar_url":"https://avatars.githubusercontent.com/u/3736223?v=3","gravatar_id":"","url":"https://api.github.com/users/DoGi114","html_url":"https://github.com/DoGi114","followers_url":"https://api.github.com/users/DoGi114/followers","following_url":"https://api.github.com/users/DoGi114/following{/other_user}","gists_url":"https://api.github.com/users/DoGi114/gists{/gist_id}","starred_url":"https://api.github.com/users/DoGi114/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoGi114/subscriptions","organizations_url":"https://api.github.com/users/DoGi114/orgs","repos_url":"https://api.github.com/users/DoGi114/repos","events_url":"https://api.github.com/users/DoGi114/events{/privacy}","received_events_url":"https://api.github.com/users/DoGi114/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/michaelbromley/angularUtils/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-24T10:48:29Z","updated_at":"2015-11-25T08:56:12Z","closed_at":null,"body":"```\r\n<tr dir-paginate=\"workingTimes in listOfWorkingTimes | orderBy: 'date' | itemsPerPage: 5\" ng-if=\"workingTimes.date > today\">\r\n                <td>{{ workingTimes.date}}</td>\r\n                <td>{{ workingTimes.from | date: \"HH:mm\"}}</td>\r\n                <td>{{ workingTimes.to |  date: \"HH:mm\"}}</td>\r\n                <td ng-if=\"workingTimes.how_much_to_work.hours < 12 && workingTimes.how_much_to_work.minutes < 10\">0{{ workingTimes.how_much_to_work.hours }}:0{{workingTimes.how_much_to_work.minutes}}</td>\r\n                <td ng-if=\"workingTimes.how_much_to_work.hours < 12 && workingTimes.how_much_to_work.minutes >= 10\">0{{ workingTimes.how_much_to_work.hours }}:{{workingTimes.how_much_to_work.minutes}}</td>\r\n                <td ng-if=\"workingTimes.how_much_to_work.hours >= 12 && workingTimes.how_much_to_work.minutes >= 10\">{{ workingTimes.how_much_to_work.hours }}:{{workingTimes.how_much_to_work.minutes}}</td>\r\n                <td ng-if=\"workingTimes.how_much_to_work.hours >= 12 && workingTimes.how_much_to_work.minutes < 10\">{{ workingTimes.how_much_to_work.hours }}:0{{workingTimes.how_much_to_work.minutes}}</td>\r\n                <td><span ng-repeat=\"position in workingTimes.positions\">{{position.name}}</span></td>\r\n                <td><a ui-sref=\"editHoW({id: workingTimes.id})\" class=\"btn btn-small btn-warning\">Edit</a></td>\r\n                <td><a ng-click=\"workingTime.deleteWorkingTime(workingTimes)\" class=\"btn btn-small btn-danger\">Delete</a></td>\r\n</tr>\r\n```\r\nOr maybe im doing it wrong?"},"comment":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/comments/159538385","html_url":"https://github.com/michaelbromley/angularUtils/issues/266#issuecomment-159538385","issue_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/266","id":159538385,"user":{"login":"michaelbromley","id":6275952,"avatar_url":"https://avatars.githubusercontent.com/u/6275952?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbromley","html_url":"https://github.com/michaelbromley","followers_url":"https://api.github.com/users/michaelbromley/followers","following_url":"https://api.github.com/users/michaelbromley/following{/other_user}","gists_url":"https://api.github.com/users/michaelbromley/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbromley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbromley/subscriptions","organizations_url":"https://api.github.com/users/michaelbromley/orgs","repos_url":"https://api.github.com/users/michaelbromley/repos","events_url":"https://api.github.com/users/michaelbromley/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbromley/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T08:56:12Z","updated_at":"2015-11-25T08:56:12Z","body":"Hi,\r\nJust had a bit of time to look into this. Yes, putting `1 , 2` or even just `true` into the ng-if will work. That's because as you say, it seems like the ng-if does not have access to the created `workingTimes` variable.\r\n\r\nI'm not sure exactly what is going on here, but unfortunately I cannot spend a lot of time on this now. I will get round to it.\r\n\r\nAs a work-around (or possibly even a better solution altogether) could you not create a custom filter and add this to the dir-paginate expression?"}}