function myController(n,o){document.getElementById("btn").onclick=function(){o(function(){n.name="Button clicked"})}}var myApp=angular.module("myApp",[]);myApp.controller("MyCtrl",myController),myController.$inject=["$scope","$timeout"]; //Recommendations: /* */
<div ng-controller="MyCtrl"> <button id="btn" type="button">Click me</button> <div>{{name}}</div> </div> <br/>