title: Using angular ui.router how to start in a standard html angular page and than move forward to one with ui.router template inside a folder?
body: <p>I have a standard angular page that is not associated with any ui.router functionality(index.html). From that page I click a link that triggers an angular call and than after some operation the flow needs to be redirected to a page inside a folder that is using angular-ui.route template. </p>
  
  <p>I have created a plunker that represents this: 
  <a href="http://plnkr.co/edit/7UQTlMRQBMXGaRdHlPfs?p=preview" rel="nofollow">http://plnkr.co/edit/7UQTlMRQBMXGaRdHlPfs?p=preview</a> (current plunker is working but there's a loop on first page trying to call default state created with $urlRouterProvider.otherwise('events');) </p>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="app"&gt;
    &lt;head&gt;
     &lt;script data-require="angular.js@1.3.16" data-semver="1.3.16" src="https://code.angularjs.org/1.3.16/angular.js"&gt;&lt;/script&gt;
     &lt;script data-require="ui-router@*" data-semver="0.2.15" src="//rawgit.com/angular-ui/ui-router/0.2.15/release/angular-ui-router.js"&gt;&lt;/script&gt;
     &lt;script type="text/javascript" src="app.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body ng-controller="LoginController as lgCtrl"&gt;
      &lt;h1&gt;This page does not use ui.router&lt;/h1&gt;
      &lt;a href="manage/home.html" ng-click="goToEvents()"&gt;Login&lt;/a&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>The page with ui-view tag is inside a manage folder:
  manage/home.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="app"&gt;
  
    &lt;head&gt;
      &lt;script src="https://code.angularjs.org/1.3.16/angular.js" data-semver="1.3.16" data-require="angular.js@1.3.16"&gt;&lt;/script&gt;
      &lt;script data-require="ui-router@*" data-semver="0.2.15" src="//rawgit.com/angular-ui/ui-router/0.2.15/release/angular-ui-router.js"&gt;&lt;/script&gt;
       &lt;script type="text/javascript" src="../app.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body ng-controller="EventsController as evtCtlr"&gt;
      &lt;h1&gt;Hello manage/home.html&lt;/h1&gt;
      &lt;div ui-view&gt;&lt;/div&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>The templateUrl page to be inserted is:
   manage/events.html</p>
  
  <pre><code>&lt;div ng-controller="EventsController as evtCtrl"&gt;
    &lt;h3&gt;Events Page&lt;/h3&gt;
    &lt;div&gt;Some user email&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>'use strict';
  (function () {
      var app = angular.module('app', ['ui.router']);
      /**
       * Configuration for ui-router module. Handles navigation based on app states.
       */
      app.config(function ($stateProvider, $urlRouterProvider) {
  
        $urlRouterProvider.otherwise('events');
  
          $stateProvider
              .state('events', {
                  url: '/events',
                  views:{
                    '@manage/home':{
                    templateUrl: 'manage/events.html'  
                    }
                  }
          });
      });
  
      app.controller('LoginController', ['$scope','$window', '$state',
        function($scope, $window, $state){
          $scope.goToEvents = function(){
            console.log('trying to load events');
            //this call doesn't work, 404 - It should?? --&gt;&gt; see reference
            //https://github.com/angular-ui/ui-router/wiki/URL-Routing
            $window.location.href = 'manage/home.html/events';
  
            //don't work
            //$state.transitionTo('events');
  
            //also don't work
            //$state.go('events');
          };
      }]);
  
      app.controller('EventsController', [function(){
          console.log('EventsController');
      }]);
  
  })();
  </code></pre>
  
  <p>I have created a plunker that represents this: 
  <a href="http://plnkr.co/edit/7UQTlMRQBMXGaRdHlPfs?p=preview" rel="nofollow">http://plnkr.co/edit/7UQTlMRQBMXGaRdHlPfs?p=preview</a></p>
  
  <p>I have tried different ways of moving from the first non ui.router page but none worked so far.</p>
  
  <p>What's the best way of doing this?</p>