I am pretty new to AngularJS.
I have created a child scope in my controller as shown below. but the model is not available / binding is not happening in the html view.
i'm not sure how to specify the model name in HTML View
var App= angular.module('App', []);
App.controller('myController', function ($scope,$rootScope, $http) {
var model = $scope.$new();
model.id = "1";
model.modelName = "New Model";
model.cityCode= 1212;
model.country= "USA";
});
HTML:
<div ng-app="App">
<div ng-controller="myController">
<label>{{modelName}}<label/>
<input type="text" ng-model="modelName" />
</div>
</div>