June 2015
Intermediate to advanced
192 pages
4h 8m
English
Handling the returned data with AngularJS is easy because it parses the returned JSON for you and passes the resulting object to the event handler you registered with the promise's success method.
Here's the complete client-side code for our AngularJS application. The success promise's callback just updates the models with the fields of the object we get as a result:
var app = angular.module("aprsapp", []); app.controller("AprsController", function($scope, $http) { $scope.json = ""; $scope.message = "Loaded..."; $scope.doAjax = function() { $scope.debug = "Fetching..."; $scope.json= ""; $scope.message = ""; var request = { call: "kf6gpe-7" }; var promise = $http({ url:"/", method: "POST", ...Read now
Unlock full access