Isaac Johnson
asked on
Coding WebAPI access via javascript
I've created my first API which contains a model with 6 different methods
accessed by the controller which access the methods as requested..
Can someone help me with the best way to approach the javascript which
will be accessible (tested for now) via my own html.
Is their a sample you can point me to in order to make it happen
I am not a javascript GURU.
Isaac
WebAPICode.zip
accessed by the controller which access the methods as requested..
Can someone help me with the best way to approach the javascript which
will be accessible (tested for now) via my own html.
Is their a sample you can point me to in order to make it happen
I am not a javascript GURU.
Isaac
WebAPICode.zip
ASKER
I want to access my api for execution passing input from my html
I would like to know how to setup
"js/LobTotalsController.js "
ScreenShotHTML.png
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<h1>LOB Totals Web API Testing</h1>
<div id="divAngular" ng-app="app" ng-controller="LobTotals" data-ng-init="requestPageInit()">
<div ng-hide="requestComplete">
<form>
<div>
<input id="Text" type="text" /><input id="Delete" type="submit" value="delete" />
<input id="Text1" type="text" /> <input id="GetSum" type="submit" value="getsum" />
<input id="Text2" type="text" /> <input id="Insert" type="submit" value="insert" />
<input id="Text3" type="text" /> <input id="LobRequest" type="submit" value="lob-request" />
<input id="Text4" type="text" /> <input id="LobByRequestNum" type="submit" value="lob-request-by-num" />
<br />
<br />
<input id="Text5" type="text" /><input id="LobTotalUpdate" type="submit" value="lob-total-update" />
<input id="Text6" type="text" /><input id="LobUpdateSelect" type="submit" value="lob-update-select" />
</div>
<div>
<br />
<br />
<input id="Text8" type="text" />
</div>
</form>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
<script src="js/app.js"></script>
<script src="js/LobTotalsController.js"></script>
</body>
</html>
I would like to know how to setup
"js/LobTotalsController.js
ScreenShotHTML.png
ASKER
I did some reading and expanded my html code to use ng-click and expanded reference tags in the javascript controller which worked out very
good.
Thanks for your comment.
Isaac
good.
Thanks for your comment.
Isaac
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is unclear to me.