In this example of Ng-Controller
, We have created a method in controller and added two buttons. Clicking on the first button will display name as "LearnKode" and if you enter the value in your name textbox then that will be displayed clicking on second button. See the example