Created
June 6, 2015 15:23
-
-
Save syrxw/ff1ce5ee5f3be8f8e7cb to your computer and use it in GitHub Desktop.
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
angular.module('app', ['ngRoute']) | |
.config(function($routeProvider, $locationProvider) { | |
$locationProvider.html5Mode(true); | |
$routeProvider | |
.when('/', { | |
templateUrl: myLocalized.partials + 'main.html', | |
controller: 'Main' | |
}); | |
}) | |
.controller('Main', function($scope, $http, $routeParams) { | |
$http.get('wp-json/posts/').success(function(res){ | |
$scope.posts = res; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment