0

Is it possibile to start the slides (ionicSlideBox) after an http call which returns all html included tag ?? The http call gets html data and stores it in a variable

    $http.get(url).
        success(function (data) {
            $scope.html = $sce.trustAsHtml(data);
        }).
        error(function (data, status, headers, config) {
        });

The template prints the variable content:

<div ng-bind-html="html"></div>

I tried to call $ionicSlideBoxDelegate.update():

$scope.html = $sce.trustAsHtml(data);
$ionicSlideBoxDelegate.update();

(i tried also ionicslideboxdelegate.start() but the slides don't work) i suppose the problem is the tag is loaded after http call..

i necessary have to get whole html, i can't print tag in the template and load only data.

Is there any solution? Thanx

Belsen
  • 313
  • 3
  • 4
  • 17
  • Where do you get the `url` to download the html from? Is it static? If so, maybe you can create a directive with a `templateUrl` set to your url and then whenever it downloads the template, angular would compile it and bind ionic stuff to it. – Ilya Luzyanin Dec 12 '16 at 16:09
  • 1
    Also, you may want to check this [question](http://stackoverflow.com/questions/19726179/how-to-make-ng-bind-html-compile-angularjs-code) since I think what happens is that your html is not compiled by angular after you insert it – Ilya Luzyanin Dec 12 '16 at 16:15
  • THANK YOU. IT WARKS!! With angular-bind-html-compile! Thank YOU – Belsen Dec 12 '16 at 16:54

0 Answers0