Ask A Question
0

Angular js ng-click is not working as expected

Asked by Cashew on 11/25/2013 at 4:56 AM

While working on basic angular examples ng-click is not working as expected

the following is my html code :

<form ng-submit="requestFunding()" ng-controller="StartUpCalculator">

Starting : <input ng-change='ComputeNeeded()' ng-model='funding.StartingEstimate'>

Recommedation : {{needed}}

<button>Fund me</button>

<button ng-click="reset()">Reset</button>

</form>

Javascript code :

function StartUpCalculator($scope) {

$scope.funding = {StartingEstimate : 0}; ComputeNeeded = function() {

$scope.needed = $scope.funding.StartingEstimate*10; };

$scope.requestFunding = function() {
 window.alert("Whoa!");

}; }

whenever i click Reset(reset()) it executes requestFunding function

View Full Answer On Stackoverflow

Responses

No responses yet. Be the first one!

    [Some content on this page is from Stackoverflow]