Continuing the discussion from Please help test: Angular 1.3, improved transitions, cached views (repost):
When you use document.querySelectorAll('span');
it will select all elements from all ion-view
, the only way to detect the current view, is to use the nav-view="active"
attribute.
var currentView = document.querySelector('ion-view[nav-view="active"]');
currentView.querySelectorAll('span'); // Spans tags from the current view only
Shouldn’t $ionicHistory.currentView() give us the current view element?
Is ion-view[nav-view="active"]
the only way to get the current view?
I’m afraid I’ll use nav-view
attribute and in the future you change the values, attribute name or something else. Thanks.