ng-click is not calling the function i tried all previous answers [closed]Finish all previous activitiesPure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itHow to add many functions in ONE ng-click?ng-click loose the function contextAngularjs remote reloadProgram can't find my script files locatedstartWith filter with object in AngularJSChange the label name dynamically in angular js getting value from angular controllerAngular Routing with Asp.net mvc areas and cshtml not workingLoading data in Fusion Chart through API using Angular JS

Creating a Master Image to roll out to 30 new Machines Licensing Issues

Is BitLocker useful in the case of stolen laptop?

What is this dollar sign ($) icon in my Menu Bar?

"Not enough RAM " error in PIC16F877a

How does Vivi differ from other Black Mages?

How would a village use its river that it shares with another village downstream?

Does the mana ability restriction of Pithing Needle refer to the cost or the effect of an activated ability?

I changed a word from a source, how do I cite it correctly?

For how long could UK opposition parties prevent new elections?

Have there been any countries that voted themselves out of existence?

Determining if file in projected or geographic coordinates using ArcGIS Desktop?

A medieval fantasy adventurer lights a torch in a 100% pure oxygen room. What happens?

Why would thermal imaging be used to locate the Chandrayaan-2 lander?

My favorite color is blue what is your favorite color?

How can I fix a framing mistake so I can drywall?

Are scroll bars dead in 2019?

How to progress with CPLEX/Gurobi

How would two worlds first establish an exchange rate between their currencies

Number of aircraft to operate in an airline company

Why are some Mac apps not available on AppStore?

Should I use my toaster oven for slow roasting?

What is Japanese Language Stack Exchange called in Japanese?

Can a level 1 Fiend Pact warlock cast a scroll of fireball?

What does my colleagues' question really mean?



ng-click is not calling the function i tried all previous answers [closed]


Finish all previous activitiesPure JavaScript equivalent of jQuery's $.ready() - how to call a function when the page/DOM is ready for itHow to add many functions in ONE ng-click?ng-click loose the function contextAngularjs remote reloadProgram can't find my script files locatedstartWith filter with object in AngularJSChange the label name dynamically in angular js getting value from angular controllerAngular Routing with Asp.net mvc areas and cshtml not workingLoading data in Fusion Chart through API using Angular JS






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-3















Am not able to get the function execution with the click on the button. I am new with angularjs I may make a silly mistake. I need suggestions as I tried most of the previous solutions. but still, it's not working for me.



<script>
var app = angular.module("myModule.controller", []);
app.controller("bar_controller", [ "$scope", "$http", "$window",
function($scope, $window, $http)

$scope.OperationalList = function()

$window.alert("calling function!");
$scope.name = data;
$http(
method : 'post',
url : '/com.az.BusinessRationAnalysis/reportGenerate',


).then(function(result)
$window.alert("succeed " + result.data);
req.data="nome":$scope.name;
$scope.jsonOperationalDataList = result.data;

, function(result)
$window.alert("Ajex call failed");


);



])
</script>
</head>
<body ng-app="myModule.controller">
<div ng-controller="bar_controller">
Name:<input type="text" data-ng-model="name" />
<button ng-click="OperationalList()">Display Report</button>
<p>Hola name</p>
</div>
```
I need the window alert to work as a hint that my function is working









share|improve this question
















closed as off-topic by Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam Mar 28 at 11:53


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Reproducible Example." – Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam
If this question can be reworded to fit the rules in the help center, please edit the question.























    -3















    Am not able to get the function execution with the click on the button. I am new with angularjs I may make a silly mistake. I need suggestions as I tried most of the previous solutions. but still, it's not working for me.



    <script>
    var app = angular.module("myModule.controller", []);
    app.controller("bar_controller", [ "$scope", "$http", "$window",
    function($scope, $window, $http)

    $scope.OperationalList = function()

    $window.alert("calling function!");
    $scope.name = data;
    $http(
    method : 'post',
    url : '/com.az.BusinessRationAnalysis/reportGenerate',


    ).then(function(result)
    $window.alert("succeed " + result.data);
    req.data="nome":$scope.name;
    $scope.jsonOperationalDataList = result.data;

    , function(result)
    $window.alert("Ajex call failed");


    );



    ])
    </script>
    </head>
    <body ng-app="myModule.controller">
    <div ng-controller="bar_controller">
    Name:<input type="text" data-ng-model="name" />
    <button ng-click="OperationalList()">Display Report</button>
    <p>Hola name</p>
    </div>
    ```
    I need the window alert to work as a hint that my function is working









    share|improve this question
















    closed as off-topic by Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam Mar 28 at 11:53


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Reproducible Example." – Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam
    If this question can be reworded to fit the rules in the help center, please edit the question.



















      -3












      -3








      -3








      Am not able to get the function execution with the click on the button. I am new with angularjs I may make a silly mistake. I need suggestions as I tried most of the previous solutions. but still, it's not working for me.



      <script>
      var app = angular.module("myModule.controller", []);
      app.controller("bar_controller", [ "$scope", "$http", "$window",
      function($scope, $window, $http)

      $scope.OperationalList = function()

      $window.alert("calling function!");
      $scope.name = data;
      $http(
      method : 'post',
      url : '/com.az.BusinessRationAnalysis/reportGenerate',


      ).then(function(result)
      $window.alert("succeed " + result.data);
      req.data="nome":$scope.name;
      $scope.jsonOperationalDataList = result.data;

      , function(result)
      $window.alert("Ajex call failed");


      );



      ])
      </script>
      </head>
      <body ng-app="myModule.controller">
      <div ng-controller="bar_controller">
      Name:<input type="text" data-ng-model="name" />
      <button ng-click="OperationalList()">Display Report</button>
      <p>Hola name</p>
      </div>
      ```
      I need the window alert to work as a hint that my function is working









      share|improve this question
















      Am not able to get the function execution with the click on the button. I am new with angularjs I may make a silly mistake. I need suggestions as I tried most of the previous solutions. but still, it's not working for me.



      <script>
      var app = angular.module("myModule.controller", []);
      app.controller("bar_controller", [ "$scope", "$http", "$window",
      function($scope, $window, $http)

      $scope.OperationalList = function()

      $window.alert("calling function!");
      $scope.name = data;
      $http(
      method : 'post',
      url : '/com.az.BusinessRationAnalysis/reportGenerate',


      ).then(function(result)
      $window.alert("succeed " + result.data);
      req.data="nome":$scope.name;
      $scope.jsonOperationalDataList = result.data;

      , function(result)
      $window.alert("Ajex call failed");


      );



      ])
      </script>
      </head>
      <body ng-app="myModule.controller">
      <div ng-controller="bar_controller">
      Name:<input type="text" data-ng-model="name" />
      <button ng-click="OperationalList()">Display Report</button>
      <p>Hola name</p>
      </div>
      ```
      I need the window alert to work as a hint that my function is working






      javascript java angularjs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 12:18







      Minh

















      asked Mar 28 at 8:25









      MinhMinh

      207 bronze badges




      207 bronze badges





      closed as off-topic by Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam Mar 28 at 11:53


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Reproducible Example." – Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam
      If this question can be reworded to fit the rules in the help center, please edit the question.









      closed as off-topic by Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam Mar 28 at 11:53


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Reproducible Example." – Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam
      If this question can be reworded to fit the rules in the help center, please edit the question.







      closed as off-topic by Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam Mar 28 at 11:53


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Reproducible Example." – Jim Garrison, il_raffa, Mark Rotteveel, Yurets, TheParam
      If this question can be reworded to fit the rules in the help center, please edit the question.






















          1 Answer
          1






          active

          oldest

          votes


















          1
















          Change the order of $window and $http. Always follow the order in which you inject your dependencies.



          your function should be function($scope, $http, $window)






          share|improve this answer

























          • Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

            – Gordon Mohrin
            Mar 28 at 11:52











          • Thank you Ravi Teja

            – Minh
            Mar 28 at 12:27














          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1
















          Change the order of $window and $http. Always follow the order in which you inject your dependencies.



          your function should be function($scope, $http, $window)






          share|improve this answer

























          • Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

            – Gordon Mohrin
            Mar 28 at 11:52











          • Thank you Ravi Teja

            – Minh
            Mar 28 at 12:27















          1
















          Change the order of $window and $http. Always follow the order in which you inject your dependencies.



          your function should be function($scope, $http, $window)






          share|improve this answer

























          • Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

            – Gordon Mohrin
            Mar 28 at 11:52











          • Thank you Ravi Teja

            – Minh
            Mar 28 at 12:27













          1














          1










          1









          Change the order of $window and $http. Always follow the order in which you inject your dependencies.



          your function should be function($scope, $http, $window)






          share|improve this answer













          Change the order of $window and $http. Always follow the order in which you inject your dependencies.



          your function should be function($scope, $http, $window)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 9:06









          Ravi TejaRavi Teja

          2,44512 silver badges31 bronze badges




          2,44512 silver badges31 bronze badges















          • Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

            – Gordon Mohrin
            Mar 28 at 11:52











          • Thank you Ravi Teja

            – Minh
            Mar 28 at 12:27

















          • Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

            – Gordon Mohrin
            Mar 28 at 11:52











          • Thank you Ravi Teja

            – Minh
            Mar 28 at 12:27
















          Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

          – Gordon Mohrin
          Mar 28 at 11:52





          Correct answer, replicated here: plnkr.co/edit/Z40BPDC6BsQ2qHeMApbC?p=preview

          – Gordon Mohrin
          Mar 28 at 11:52













          Thank you Ravi Teja

          – Minh
          Mar 28 at 12:27





          Thank you Ravi Teja

          – Minh
          Mar 28 at 12:27








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.





          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript