One of my variables, $scope.code.N3, is populated by an asynchronous ajax call.
Another variable, $scope.data.selectedIRI, holds the value of an option selected in an html combobox.
I have a snippet of html code within a table that needs to be refreshed when the variable changes:
This code works fine and updates correctly:
<tbody>
<tr ng-repeat="t in code.N3" ng-if="t.subject==data.selectedIRI" ng-include="'displayPredicateObject'">
<!-- Rendered by template -->
</tr>
</tbody>
However, this section does not update as expected (even though it works elsewhere in my code where similar snippets are used within angular-refreshed tags):
<tbody ng-init="allTriples = code.N3">
<tr ng-repeat="t in allTriples" ng-if="t.subject==data.selectedIRI" ng-include="'displayPredicateObject'">
<!-- Rendered by template -->
</tr>
</tbody>
Additionally, this section also fails to update:
<table ng-init="s = data.selectedIRI">
<tbody ng-init="triples = getTriples(null, null, s)">
<tr><td>[[triples]]</td></tr>
</tbody>
</table>
In this case, the function getTriples(...,...,data.selectedIRI) is never triggered even though $scope.data.selectedIRI has been updated. Any ideas why?