I am working with AngularJS project and I have the following problem. I have a code:
form.html:
<form>
<input ng-model="someVariable" type="text"/>
</form>
details.html:
<div ng-include="'form.html'"></div>
{{ someVariable }}
AngularJS Controller for details.html:
angular.module('SomeModule')
.controller('DetailsController', function ($scope) {
$scope.someVariable = {};
});
With this code someVariable is not displaying, but when I change ng-model to someVariable.someField, and i try to display it... it works! Could anyone explain me why?