Skip to content

Instantly share code, notes, and snippets.

@amielucha
Created October 10, 2015 15:27
Show Gist options
  • Save amielucha/3d6a439043f4b72c2d55 to your computer and use it in GitHub Desktop.
Save amielucha/3d6a439043f4b72c2d55 to your computer and use it in GitHub Desktop.
AngularJS ♥ WordPress Tutorial part 6 #tutorial
(function(){
var app = angular.module('angular♥wp', ['ngRoute']);
var api = {};
app.config(function($routeProvider, $locationProvider){
// Enable html5 mode
$locationProvider.html5Mode(true);
// configure routing
$routeProvider.when('/', {
templateUrl: 'content.html',
controller: 'Main',
});
});
app.controller('Main', ['$scope', '$http', '$routeParams', function($scope, $http, $routeParams){
console.log('test');
}]);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment