I try to use angular-ui, and try to inject $stateProvider:
html
When using it in a controller you have to use $state:
angular.module("appModule", ['ui.router']).controller('appController', ['$scope', '$state', function ($scope, $state) {
$scope.date = new Date();
}]);
You can only use the state provider in the config, for example:
angular.module('appModule').config(['$stateProvider', function($stateProvider){
/* do w/e with state provider */
})];