I am making a very basic angular app using ui-router, and I have 3 "modules" right now, which are home, login, and register. Here is how I have defined them:
'use strict'; var app = angular.module('exampleApp', [ 'ui.router', 'ngAnimate', 'ui.bootstrap' ]); app.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/'); $stateProvider .state('home', { url: '/', templateUrl: './main/home/home.html', controller: './main/home/home-controller.js' }) .state('login', { url: '/login', templateUrl: './main/login/login.html', controller: './main/login/login-controller.js' }) .state('register', { url: '/register', templateUrl: './main/register/register.html', controller: './main/register/register-controller.js' }) }) However, I think I am doing the controller: portion wrong. I want to define each controller for each "module", and I'm not sure how to go about doing that.
Here's my file structure -
