title: AngularJS : Load js file through UI router
body: <p>I have AngularJs ui router in my application. I need to load js file based on my state.</p>
  
  <pre><code>.state('root.home',{
          url: '/index.html',
          views: {
              'header': {
                  templateUrl: 'modules/header/html/header.html',
                  controller: 'headerController'
              },          
              'content-area': {
                  templateUrl: 'modules/home/html/home.html',
                  controller: 'homeController'
              },
              'footer': {
                  templateUrl: 'modules/common/html/footer.html',
                  controller: 'footerController'
              }
          },
          data: {
              displayName: 'Home',
           }
      })
  </code></pre>
  
  <p>The headerController,homeController and footerController have different js files when the home state is loading at that time we need to load the controller js files Is it possible through the UI router?</p>