n8finch
9/19/2016 - 3:44 AM

pageView-controller-genesis-angular-gulp.js

pageView-controller-genesis-angular-gulp.js

.controller('pageView', ['$scope', '$http', '$stateParams', function ($scope, $http, $stateParams) {
      console.log('pageView running');
      $http({
        url: 'https://n8finch.dev/wp-json/wp/v2/pages?filter[name]=' + $stateParams.slug,
        cache: true
      }).success(function (res) {
        $scope.post = res[0];
      });
    }])