Unable to show post list using http result :( Console does show up the result


Hi Experts,

Just started to explore ionic but stuck here .

I want to bring the posts from wordpress custom post type my list works fine when i output the result to console.

$rootScope.url = http://cookingshooking.com

My controller.js

.controller('EventsCtrl', function($scope, $http, $rootScope){
			.get($rootScope.url + '/wp-json/posts?type=slider', {cache:true})
			.then(function(response) {
			$scope.events = response.data.results;
			// console.log(response)  //<--This Actually prints the result on my console


My html

    <ion-view view-title="Events">
		<ion-item ng-repeat="event in events" href="#/app/events/{{event.id}}">


my app.js

  .state('app.events', {
    url: "/events",
    views: {
      'menuContent': {
        templateUrl: "templates/events.html",
        controller: 'EventsCtrl'


Looking at the data returned by that URL that should be just response not response.data.results.


Thank you very much. your suggestion helped me. “response.data” is bringing required data.