在AngularJS中,$http是用來做Ajax的功能. 以下會談到$http及$httpProvider.
2015年2月5日 星期四
2015年2月4日 星期三
2015年2月3日 星期二
AngularJS-使用$resource
在AngularJS中,$resource是架構在$http之上的Ajax的功能.
如果只是用來作CRUD的AJAX, $resource會是一個比較好的選擇.
如果只是用來作CRUD的AJAX, $resource會是一個比較好的選擇.
AngularJS-是否要使用ControllerAs以及vm變數
在學習Angular過程中,官方的教學都是將$scope注入controller中來控制及儲存資料.
但最近在看coding style時,有看到2個高手提到儘量使用"ControllerAs",而不要使用$scope.
但最近在看coding style時,有看到2個高手提到儘量使用"ControllerAs",而不要使用$scope.
訂閱:
文章 (Atom)