그누보드 데이타를 JSONP로 읽어서 정보
그누보드 데이타를 JSONP로 읽어서
본문
Angular.js로 처리해 보고 있습니다.
angular.module('', []);
function DataCtrl($scope, $http) {
$http.jsonp("http://localhost/gb51/restful/api/v1/board/gallery?callback=JSON_CALLBACK").
success(function(data) {
$scope.data = data;
$scope.boards = data.boards;
}).
error(function (data) {
$scope.data = "Request failed";
});
}
간단하게 index.html에서 아래 처럼 볼수 있습니다.
<div ng-controller="DataCtrl">
<ul>
<li ng-repeat="board in boards">
{{ board.wr_subject }}
</li>
</ul>
</div>
공감
1
1
댓글 1개

다음은 ng-route 처리 그리고 페이지 처리, Comments 처리 순인 것 같습니다.
다음으로 onsen ui나 ionic을 입히면 될것 같습니다.
지금은 angular.js에 집중...
다음으로 onsen ui나 ionic을 입히면 될것 같습니다.
지금은 angular.js에 집중...