AngularJs(四):$Http,$resource

一.使用$http $http服務是隻能接受一個參數的函數,這個參數是一個對象,包含了用來生成HTTP請求的配置內容。這個函數返回一個promise對象,具備success和error兩個方法。例如代碼: $http({    method:"GET",    url:'/xx/xx' }).success(function(data,status,headers,config){ //當相應準備
相關文章
相關標籤/搜索