I'm using
<div ng-include = "myController.myVar">.
During the flow of my program, myController.myVar a string generated by the return of a function.
Example:
myController.myVar = MyFunction ();
Although the value of myController.myVar has been properly updated, ng-include does not render the new value.
Here's a new example. (Although it's simple, the actual application is a bit more complex). Basically it is something as described below:
We have an ng-include to render some pages.
In the controller we have a function very similar to this:
var myFunction = function (index) {
return [
"path1",
"path2",
"path3"
][index];
};
Follow the flow:
// Start MyController.MyVar
this.MyVar = myFunction (0);
// An HTTP request is made and, if the return is as expected, then the value of myVar is updated.
if (request === 'success') {
this.myVar = MyFunction (1);
}
However, ng-include does not seem to recognize the new MyVar value in the view and does not reload the new value.