# Pastebin mSyxqYlV var mainModule = angular.module("mainModule", []); mainModule.config(function($stateProvider, $urlRouterProvider){ console.log("hello"); $urlRouterProvider.otherwise('/'); $stateProvider .state('home',{ url: '/', templateUrl: "/app/templates/home.html" }); }); var mainController = function ($scope) { this.$inject = ['$scope']; this.scope = $scope; this.initScope(); } mainController.prototype = { initScope: function () { } }; angular.module('mainModule').controller('mainController', mainController);