Created
September 19, 2016 03:10
-
-
Save n8finch/1f5e4e20bd499098340e4230676aad57 to your computer and use it in GitHub Desktop.
singleView-controller-genesis-angular-gulp.js
This file contains hidden or 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('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]; | |
| }); | |
| }]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment