I have a simple scenario in a large piece of code:
- Angular APP & Controller (all working well)
- one
ng-model
element is dynamically created later (or lets say it comes from an ajax call). How to bind this into that controller?
For example:
var dtApp = angular.module('App1', []);
dtApp.controller('Cont1', function($scope)
{
.
.
.
.
$scope.xyz='1';
}
.
.
.
//element created dynamically on click:
<input type="text" ng-model="xyz" />
.
This is just an example, but it will solve the actual and larger problem if I know the solution.
Thanks a lot.