Passing asynchronously obtained data to a directive
I currently have an AngularJS controller that is basically getting some JSON asynchronously through a $http.get() call, then linking the obtained data to some scope variable. A resumed version of the controller code: mapsControllers.controller('interactionsController', ['$http', function($http) { var ctrlModel = this; $http.get("data/interactionsPages.json"). success(function(data) { ctrlModel.sidebar = {}; ctrlModel.sidebar.pages = data; }). error(function() {...}); }]); Then, I have a custom directive which receives those same scope variables through a HTML element. A resumed version of the