In ionic view app window.location Not working but it working in web browser

window.location = ‘index.html#/teams/team-detail’;

so why don’t you use $state.go() or ui-sref

how to use $state.go() and ui-sref can please show me an example

i am newly using ionic for my product

check out these two links ui-sref & $state.go()


<a ui-sref="">Home</a> 


not working plz help

$scope.getpatdetails = function (item) {
sessionStorage.setItem(“PatientName”, item.fullname);
sessionStorage.setItem(“PatientId”, item.Id);

i am using window.location in controller it is not working
** window.location = ‘index.html#/patient/patientsummary’;**


in app.js --------------------------------------------------------------------------------------

.state(‘patient.Summary’, {

         url: "/patientsummary",
         views: {
             "patContent": {
                 templateUrl: 'app/patient/patientsummary.html'


Your routes should be looking something like this

.state(‘patient’, {
url: “/patient”,
templateUrl: ‘app/patient/patient.html’,
.state(‘summary’, {
url: “/patientsummary”,
views: {
“patContent”: {
templateUrl: ‘app/patient/patientsummary.html’

then you can use the $state.go(‘patient.summary’)