angular.module('yoApp', ['ngAnimate','ngCookies','ngResource','ui.router']) .config(function($stateProvider,$urlRouterProvider,$locationProvider){ $urlRouterProvider.when("", "/index"); $stateProvider.state("index",{ url:"/index", templateUrl: 'views/index.html', controller: 'MainCtrl', }) .state("login",{ url:'/login', templateUrl:'views/login.html', controller: 'loginCtrl' }) .state("system",{ url:"/system", templateUrl:"views/system.html" }) .state("system.systemList",{ url:"/systemList", templateUrl:"views/systemList.html", controller: 'systemlistCtrl', }) .state("system.systemAdd",{ url:"/systemAdd", templateUrl:"views/systemAdd.html" }) .state("user",{ url:"/userList", templateUrl:"views/userList.html" }) .state("dietitian",{ url:"/dietitian", templateUrl:"views/dietitianList.html" }) .state("recommend",{ url:"/recommendList", templateUrl:"views/recommendList.html" }) .state("foods",{ url:"/foodsList", templateUrl:"views/foodsList.html" }) });