The 'Thanks' popover worked fine on the first try, but it quickly disappears on the succeeding attempts.
I used uib-popover and set its template to a <div> with simple input text & button at first. Then on clicking Submit, I set again the template to a simple 'Thanks' <div>. It is showing fine on the first try, but it quickly disappears on the succeeding attempts.
Note that the 4 pairs of thumbs are rendered by ng-repeat and each action made on the items are isolated using index
CodePudding user response:
We just need to add some delay of 50 milliseconds before switching to “thanks.html”. when you change the content popup js takes time to recalculate the position of the element as the content changes.
Add a $timeout before switching to thanks.html.
feedbackApp.controller('feedbackCtrl', function ($scope, $sce, $timeout) {
$timeout(function () {
$scope.templates[id] = $sce.trustAsResourceUrl("thanks.html");
}, 50);

