Created
June 6, 2015 15:26
-
-
Save syrxw/7e263e849ac93c885045 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