I've created an accordion based on ngResource (for live/ajax data). All works fine, however the accordion flashes (twice) on loading. How can I stop this?
This is my code (service):
AdminMenu.factory('myServices', ['$resource', function($resource) {
return $resource('/api/categories?sort=createdAt asc');
}]);
And this is my template:
accordion(class="admin-accordion", close-others="accordion", ng-cloak)
accordion-group(ng-repeat="category in categories", is-open="category.active", heading="{{category.name}}")
tabset
tab(ng-repeat="subcat in category.subcategories", heading="{{subcat.name}}", active="subcat.active", select="alertMe(category.subcategories)") {{subcat.content}}
PS: I don't know whether it could be related but within my accordion, I also have a tab using the same data as the accordion (as you can see from example above)
Any ideas?