<div ng-app="my_app" ng-controller="my_ctrl">
Your Name<input type=text ng-model="t1" >
<br><br>
<b>Welcome</b> : {{t1}}
</div>
<script>
var app = angular.module('my_app', []);
app.controller('my_ctrl', function($scope) {
});
</script>
Default data of Textbox
We can fill the textbox with default data and the same can be changed by user.
DEMO : Default data of Textbox →
Blur method of Textbox
Once the Tab is pressed or mouse is clicked outside the textbox after entering data, the blur method can be triggered.
DEMO : Blur method of Textbox →
Focus method of Textbox
On focus event of a textbox we can execute code and read the data entered.
DEMO : Focus method of Textbox →
←Angular Home