title: How to load controller in angular js using require js
body: <p>I am trying to load a controller so that my view will display. Actually I write my controller <code>.Route</code> or <code>config</code> also .But I am not able to load my controller and route file how to load controller using <code>require.js</code> so that my <code>login.html</code> page is display?</p>
  
  <p>Here is my Plunker:</p>
  
  <blockquote>
    <p><a href="http://plnkr.co/edit/DlI7CikKCL1cW5XGepGF?p=preview" rel="nofollow">http://plnkr.co/edit/DlI7CikKCL1cW5XGepGF?p=preview</a></p>
  </blockquote>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>requirejs.config({
      paths: {
          ionic:'http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.min',
  
      },
      shim: {
          ionic : {exports : 'ionic'}
      }
  });
  </code></pre>
  
  <p><strong>route.js</strong></p>
  
  <pre><code>/*global define, require */
  
  define(['app'], function (app) {
      'use strict';
  
      app.config(['$stateProvider', '$urlRouterProvider',
              function ($stateProvider, $urlRouterProvider) {
  
              $stateProvider
                  .state('login', {
                      url: "/login",
                      templateUrl: "login.html",
                      controller: 'LoginCtrl'
                  })
  
              $urlRouterProvider.otherwise("/login");
  
          }]);
  
  
  });
  </code></pre>
  
  <p>Any guess how to load view?</p>