n8finch
9/19/2016 - 3:10 AM

singleView-controller-genesis-angular-gulp.js

singleView-controller-genesis-angular-gulp.js

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