How I can set another Page as my Default Page in Ionic?


#1

I’m Building a pocketReferrence App ,I made a 2 html page with lock icon but different , when I click the button it will navigate to another page and will set it to default…I’m Having a problem how can I do this in my app using ionic , can you Help me , Thanks.


#2

I hope you have a previous AnularJS knowledge.

From what I can see you have a list view. Hopefully, this listview is build using JSON data, also I hope lock symbol state is part of that JSON. If not add it as such.

Once you click on a PlayTest just change lock state of that list element (change JSON value of that state) and Angular will automatically change lock state.


#3

Uhm, my listview is not build by JSON data , I used normal text in ion item,
I’m still learning AngularJS but I understand it a little bit ,
Can You give me a sample code for that ? Thanks for the help .


#4

Don’t get me wrong but my answer is no. I simply don’t have time to do that. I mean this is Angular basics, just play with it until you make it work.


#5

Ok , maybe I’ll just find it in google, by the way thanks for the time replying in my post .


#6

store the latest “test”-step in the localstorage.
if you reopen that state --> check that localstorage key and do a redirect.


#7

@bengtler uhm… I’m not still yet familiar with the localstorage , can you give some example in using this local storage ? thanks . :relaxed:


#8

i am using this plugin as a wrapper:

but the locastorage functionality is set on the window object:


#9

bengtler , do you have some sample in deleting history and saving as default page ? in using localstorage ?