angularjs - alert box isn't raised in the code, its written for conform msg -


function

        fcontroller($scope,$window)         {            $scope.persons=[];              $window.alert("hi in body");             $scope.saveit = function () {               $window.alert("alert in save");              //$scope.persons.push({    });             };           }        <button  id="bt1" ng-click="saveit()">save</button> 

$window.alert not correct. window.alert is. don't need include $window in dependency injections.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -