Angular JS and Webservices
Angular JS and Webservices
我想用Angular JS调用Web服务。我是Angular JS的新手。我有几个问题,需要你的专业知识。1)我正在使用WAMP,我是否需要使用/安装一些框架才能从Angular JS进行REST调用?2)请分享一些很好的高级教程链接。我一直得到一些与移动开发相关的教程。
谢谢尤克提
1)不,你不需要框架来进行REST调用。您只需在控制器或服务中使用$httpProvider
$http.get('/someUrl').
success(function(data, status, headers, config) {
// this callback will be called asynchronously
// when the response is available
}).
error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
2)推荐教程:
- http://www.bennadel.com/blog/2612-using-the-http-service-in-angularjs-to-make-ajax-requests.htm
- https://egghead.io/lessons/angularjs-http
相关文章:
- Selenium WebDriver and JavaScript change
- PHP and Javascript functions
- Javascript Return and if/else
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- TimelineJS and AngularJS
- timeago.js with datatable and PHP
- javascript button ajax and php
- Ajax and Json with Rails
- Combine onload, onresize and onclick
- php布尔值's小写AND大写和数字布尔值'可以接受
- setTimeout and V8
- Jquery post and onclick
- Moment js and IOS
- Rails 3.2 and Paloma gem
- Backbone, TypeScript, and super
- iframe and JavaScript on different pages
- JSON and jQuery Search
- Angular JS and Webservices
- jQuery, JSON objects and .NET WebServices