I cannot find an alternative solution to what I am trying to do, lets say I have this code in jquery:
$.get 'file.json', (re) ->
for k, v in re
tpl = "<div>{{v.content}}</div>";
$ '#container'.append tpl
.done () ->
impress().init()
That works fine because, .done
executes the code only after the ajax, but angular seems like don't have some like .done
, and impress().init()
cannot reinitialize when the content was loaded, therefore there will be a mistake on data binding..
Here is my attempt on angular
App.controller 'SomeCtrl', ($scope, $http) ->
$http.get('file.json')
.success (res) ->
$scope.slides = res
#what could possibly be in here