I am following an online example. However, it doesn't work quite the way I had hoped it would. Now, I could easily do this with jQuery and a class, but I am trying to do it the "Angular Way".
The Angular Template for my tags is initially displaying. Once the scope starts to process, then it hides & the tags come-in as expected when binding.
Q: How do I prevent the Angular Template form initially displaying?
UPDATE:
Applying "ng-bind" only changes the nature of the problem. It doesn't solve the problem.
MY MARKUP LOOKS LIKE:
<div ng-controller="BlogsIndexController">
<div class="tags-cloud tags-cloud-category" ng-show="isShown">
<div class="tag" ng-repeat="category in categories">
<a href="#" data-iso-sort="iso-sort-category-{{category.SortKey}}">{{category.Name}}</a>
</div>
</div>
</div>
MY CONTROLLER LOOKS LIKE:
// CONTROLLER
application.controller('BlogsIndexController', function ($scope, $http, categoryTagsDataService) {
var vm = this;
// Internal
vm.on = {
databind: {
categories: function () {
var categories = categoryTagsDataService.list()
categories.success(function (data) {
$scope.categories = data;
$scope.isShown = true;
});
}
}
};
vm.databind = function () {
vm.on.databind.categories();
};
// Scope
$scope.isShown = false;
$scope.categories = [];
// Initialize
vm.databind();
});