Imagine a simple variable string in a controller MyCtrl
:
$scope.simpleString = 'hi i am your simple string!';
which is the the Angular model of a simple text input
:
<input type="text" ng-model="simpleString">
This input now is used in two different views part1 and part2:
<div ng-controller="MyCtrl">
<div ng-include="'part1'"></div>
<div ng-include="'part2'"></div>
</div>
Using two different views seems to break my databinding although it is supposed to be in the MyCtrl
scope.
Info: I also tried to use ui-view
but it boils down to the very same thing.