It is recommended to use a dot in your ng-model. More information can be found here
To ensure that your code functions correctly, make sure it follows this format:
In the JavaScript file:
.controller('sample', function($scope){
$scope.user = {};
$scope.cancel = function(){
console.log("cancel")
}
$scope.$watch('user.FirstName', function() {
console.log("FirstName")
// fetch();
});
$scope.$watch('FirstName1', function() {
console.log("FirstName1")
// fetch();
});
//Here I need to Change Selected Tab
})
In the HTML file:
<pane id="FirstTab" title="First Tab">
<div><div class="form-group">
<label for="text">First Name</label>
<input type="text" required ng-model="user.FirstName" class="form-control" id="FirstName">
</div>
<div class="form-group">
<label for="text">Middle Name</label>
<input type="text" required ng-model="user.MiddleName" class="form-control" id="MiddleName">
</div>
<div class="form-group">
<label for="text">Last Name</label>
<input type="text" required ng-model="user.LastName" class="form-control" id="LastName">
</div>
</div>
</pane>