These are chat archives for angular/angular-2-ionic-2

Oct 2016
Stephan Kristyn
Oct 26 2016 14:53
OK majro doubt
if I have in constructor a SUBCRIPTION to an OBSERVABLE
and then NAVIGATION AWAY with nav.push() or nav.back
is the subscription still active or will a Navigation back to that side or a new push back to that site, or will that sibscribable ANEW be instantiated
and i have 100.000 Subscribebables
in my app?
I think this is a major question
Stephan Kristyn
Oct 26 2016 15:00
Oko we figured this out
thorough testing
subscription will always be active
we need to .take1 argument
in order to destroy subscripable
or alternatively onViewDidLeave ionic hook and destroy subscription ther
anybody else has ideas to this topic?
Oct 26 2016 19:12
how to change tab by swap?
Oct 26 2016 19:15
@idanwebzi hammerjs
Oct 26 2016 19:19
@cescoferraro trid this before?
Oct 26 2016 19:24
Not the tab switch, but have used hammer to get long press
The tabs thing seems pretty doable
Oct 26 2016 19:38
there is a swipe event in ionic 2 but it not get me indicates in which side i swap
Oct 26 2016 19:40
@idanwebzi hammerjs got them all
you just need to create an new instance of hammer with a tab ElementRef then atach any listener you want
@nottinhill I use the onviewdidleave to unsubscribe from everything
I think that if you use the async pipe
and use Observables<T>
you get the automatic subscription
*unsubscription once the view leave