title: How to make optimal routing for ionic applications ? What life cycle methods should I choose?
body: <p>In Ionic, pages are cached, and because of this, it is not always good to use angular lifecycle hooks<br />
  (<em>ngOnInit</em>, <em>ngOnDestoy</em>, ...). They just won't work, because the page is still on the stack.</p>
  <hr />
  <p>With the help of Google and experiments, I learned 2 solutions (+ a little experimentation...).</p>
  <ul>
  <li><p><strong>Option A =&gt; &quot;ng-hooks + ion-navigation&quot;</strong><br />
  You can use angular lifecycle hooks (<em>ngOnInit</em>, <em>ngOnDestroy</em>, ...),<br />
  but you need to navigate using <code>navController.navigateRoot(...)</code><br />
  (why this method solves the problem-I do not know, it is magic)</p>
  </li>
  <li><p><strong>Option B =&gt; &quot;ng-navigation + ion-hooks&quot;</strong><br />
  You can apply angular routing using <code>router.navigate(...)</code>,<br />
  but then you will need to use Ionic lifecycle hooks<br />
  (for example, <em>ionViewDidEnter</em>, <em>ionViewDidLeave</em>, ...)</p>
  </li>
  </ul>
  <p>This is certainly good, but I want more angular logic and less ionic logic.<br />
  <strong>question #1</strong> =&gt; Which option do you use and why ?</p>
  <hr />
  <p>And yet it seems to be different pages are cached in different ways.<br />
  One page when routed will simply change its position in the stack,<br />
  and the other will be removed from the stack (for some reason)<br />
  This is where the complete misunderstanding begins for me.</p>
  <p><strong>question #2</strong> =&gt; How does it work (in simple words) ?</p>
  <hr />
  <p>P.S.: thank you in advance for your answer, I am very interested to know )</p>