$state.go is not working in AngularJS?
<p>How to call ui-view from another Controller in AngularJS</p>

<p>This is my sample program. Actually in here I am using nested ui-view. The problem is when I click the submit button initially it works fine and show an alert SampleController</p>

<p>But again i clicked it doesnt got to SampleController why?</p>

<p>I need to go to that controller when i click on submit button</p>

<p>Is it any error on my code.Please check it my stateProvider too.I am a new starter in AngularJS</p>

<p>Plese correct me Thank you... </p>

<pre><code>var app=angular.module('TestApp', ['angular.filter','ui.router']);
app.config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/');
    $stateProvider
        .state('category', {
        views : {   
            "body" : {
                url : '/category',
                templateUrl : 'category.html',
                controller : 'TestController'
            }
        }       
    })
    .state('category.subcategory', {
        url : '/subcategory',
        views : {                              
            "subbody@category" : {
                templateUrl : 'sample.html',
                controller : 'SampleController'              
            }
        }
    })
});

app.controller('MainController', MainController);
function MainController($scope,$state) {
    alert("This is MainController") 
    $scope.getCategory=function(){
        $state.go('category');
    }
}

app.controller('TestController', TestController);
function TestController($scope, $state){    
    $scope.getData=function() {
        alert("Call to Sample Controller")
        $state.go('.subcategory');
    }
}

app.controller('SampleController', SampleController);
function SampleController($scope,$state) {
    alert("This is SampleController")
}
</code></pre>

<p>This is my sample HTML files
index.html</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html ng-app="TestApp"&gt;

  &lt;head&gt;
    &lt;link rel="stylesheet"&gt;
        &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"&gt;&lt;/script&gt;
        &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-route.min.js"&gt;&lt;/script&gt;
        &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.8/angular-filter.js"&gt;&lt;/script&gt;
        &lt;script src="angular-ui-router.js"&gt;&lt;/script&gt;    
        &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
    &lt;body ng-controller="MainController"&gt;
        &lt;a href="#" ng-click="getCategory()"&gt;Click to Category&lt;/a&gt;
        &lt;div ui-view="body"&gt;&lt;/div&gt;  
    &lt;/body&gt;
&lt;/html&gt; 
</code></pre>

<p>category.html</p>

<pre><code>&lt;div&gt;      
   &lt;input type="button" name="button" id="button" value="Submit" ng-click="getData()" /&gt;
   &lt;div ui-view="subbody"&gt;&lt;/div&gt;
 &lt;/div&gt; 
</code></pre>

<p>sample.html</p>

<pre><code> &lt;div&gt;
    Sample Controller
&lt;/div&gt;
</code></pre>

<p>I need to hit SampleController when i click submit button    </p>