Created
September 19, 2016 03:44
-
-
Save n8finch/78f4802ce3749ad6e3db2e491c5c3463 to your computer and use it in GitHub Desktop.
pageView-controller-genesis-angular-gulp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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]; | |
}); | |
}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment