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;
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
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
add a comment |
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
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
add a comment |
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
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
javascript java angularjs
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
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
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
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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)
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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)
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
add a comment |
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)
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
add a comment |
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)
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)
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
add a comment |
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
add a comment |
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.