-1
我試圖讓一個應用程序顯示我的博客文章在新聞feed.I使用離子爲它。我的問題是,帖子的標題不顯示在html頁面,而我可以訪問他們在控制檯窗口中。我無法理解這個原因。請幫我解決這個問題。 我的HTML頁面的代碼是內容不顯示在Ionic
<ion-view view-title="TheGeekInn" ng-controller="homeCtrl">
<ion-content>
<h1>Geek</h1>
<div ng-repeat="story in stories">
{{story.title}}
</div>
</ion-content>
</ion-view>
和控制器代碼
.controller('homeCtrl',function($http,$scope){
$scope.stories=[];
$http.get('http://www.thegeekinn.in/category/technical/?json=1').success(function(response){
angular.forEach(response.posts,function(post){
$scope.stories.push(post.title);
console.log(post.title);
});
});
})
感謝它的工作:) – user317461