@HappyHappyJoyJoy wrote:
Hi there,
sometimes my compiled html content is not showing, but only sometimes. Most of the times everything works like a charm. The variable html contains random html content everytime. The variable compiledHtml contains a compiled dom node everytime. But sometimes the view won't show the compiledHtmlContent.
Why? And how to confirm that the node will be shown? Is somewhere an update method for the view?
here the view:
<ion-content> <div id="html-container"></div> </ion-content>
here the controller:
var compiledHtml = $compile(html)($scope)[0]; document.getElementById('html-container')).appendChild(compiledHtml);
Boohooo! Why it does not work everytime? Why it shows a blank content view sometimes? This makes me unhappy
And no, there's no option to use ng-bind-html attribute, because the html content contains ionic directives like "ion-slide-box" that must be $compiled, else they won't run.
On iOS this fault appears more often than on Android. My versions:
Ionic 1.7.14
Cordova 6.1.1
Bower 1.7.9
npm 2.11.3
Posts: 1
Participants: 1