Search code examples
angularjsangular-strap

angular-strap modal directive not showing content twice


I can't get the angular-strap modal directive to work properly. The content only shows up once, after that I just get the {{angular-expression-here}}. The original link, from the angular-strap page - does not work either. You can only see the "Hello Modal" the first time. If you want to see the message again you have to change it (eg: "Hello Modal 1").

This happens if you use the "with $http service" button.

The plunkr here


Solution

  • Found the answer here.

    Adding persist:true to the modal config worked for me.

    var modal = $modal({
            template: 'partials/main/modal.html',
            show: true,
            backdrop: 'static',
            scope: $scope,
            persist: true
        });