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

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?