E
egarcia
Guest
Hello Louis, Yes, it might be a timing issue. The "then()" might be executing after the HTML has been initialized and setting options.html is too late. (What do you see in the message from the console.log()?) Perhaps, you could set the custom HTML component directly instead of setting it via the options. Here is a sample "setInitialHTML()" function that uses $watch() to watch for when the component is instantiated and then set the component. setInitialHTML(componentName, htmlText) { var cancelWatch = this.$scope.$watch(function() { var element = angular.element(componentName); if (element.html() === undefined) { return undefined; } else { return element; } },function(element, oldValue) { if (element) { element.html(htmlText); cancelWatch(); } }); } // Fired when view content is loaded onShow($scope) { console.log('Show: ' + this); this.setInitialHTML("#customhtml0", "Hello World!"); } I hope this helps, Edsel
Continue reading...
Continue reading...