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()

eg

<a ui-sref="teams.team-detail">Home</a> 

$state.go('teams.team-detail')

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’,
abstract:true
}
})
.state(‘summary’, {
url: “/patientsummary”,
views: {
“patContent”: {
templateUrl: ‘app/patient/patientsummary.html’
}
}
})

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