Data will be copied and displayed when the textbox is focused. Change the input text, focus can be taken out and entered again to reflect the changes in data display .
With the focus method, Textbox data will appear here
<div ng-app="my_app" ng-controller="my_ctrl">
Your Name <input type=text ng-model="t1" class=form-control ng-focus="my_focus_Method()">
<b>Welcome</b> : {{t1}}
</div>
<div class='alert alert-primary' role='alert' id=d1>
With the focus method, Textbox data will appear here
</div>
<script>
var app = angular.module('my_app', []);
app.controller('my_ctrl', function($scope) {
$scope.t1= "Robort";
$scope.my_focus_Method = function(){
document.getElementById('d1').innerHTML=$scope.t1;
}
});
</script>
← Textbox
←Angular Home