Created
October 10, 2015 15:27
-
-
Save amielucha/3d6a439043f4b72c2d55 to your computer and use it in GitHub Desktop.
AngularJS ♥ WordPress Tutorial part 6 #tutorial
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
(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