Hi I am new to Angular Js. I have a model like below
$scope.data = {
FocusOn: "",
Filters: [
{
FilterName: "",
FilterValue: ""
}
],
Range: {
From: "",
To: ""
}
}
Below is my simple HTML,
<select ng-model="data1.Filters.FilterName" ng-options="day for day in days"></select>
<input type="text" ng-model="data1.Filters.FilterValue"/>
<button ng-click="addField()">Add Field</button>
JS is like below
$scope.data.Filters.push(data1);
But it is not pushed into the arrary. What went wrong and How to use complex models in Angular Js.
Can any one help me?
Thanks,