.controller('HomeController', function($scope,$location) { $scope.userName='天下大势,为我所控!'; $scope.clkUrl=function(){ $scope.pageUrl='norout1.html';//更改值 } $scope.clk2=function(){ alert($scope.userName); $scope.userName='司马懿' } }).directive('bhtml',func…