Hi,
This is probably a really dumb question but I really can’t answer it myself so reaching out for some help.
I have created the dummy or sample Ionic tabs app. This is the one that creates a simple app that looks like you are chatting to somebody. On the bottom you have a Status, Chats Friends and Account button.
I can easily create it, build it, load it into Xcode and test it. That works fine.
I then added at the start of each controller in controllers.js a simple line
console.log(" entered");
I change the value of to be whatever the controller is. These additional console.log changes are the only changes I make.
I then rebuild it and deploy it to a simulator.
The deployment works fine and when I run it and clock on the buttons on the bottom, I get console output like this
2015-01-15 11:24:30.653 myApp[30912:79429] ChatsCtrl entered
2015-01-15 11:24:52.109 myApp[30912:79429] ChatDetailCtrl entered
2015-01-15 11:24:58.484 myApp[30912:79429] ChatDetailCtrl entered
2015-01-15 11:26:34.345 myApp[30912:79429] FriendsCtrl entered
2015-01-15 11:26:53.926 myApp[30912:79429] AccountCtrl entered
Which is exactly what I expect. As each controller is entered a debug line is put out.
However when I click on the Status button again, the correct screen pops up but no console message is written out. This is the same for Chats, Friends and Account, yet for ChatsDetailCtrl and FriendsDetailCtrl the console message saying the controller has been entered is written out and keeps getting written out each time.
I’m confused (not difficult) and wondered why this is happening.
The reason for this is I have used this as a sample and want something to happen each time I click on the button.
Any guidance appreciated.
Thanks,
Rob.