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
Post a Comment