title: Angular router - Should isActive() identify the main route, when a secondary routes is also open?
body: <p>I'm finding that <code>router.isActive</code> is returning <code>false</code> any time a secondary route is open. </p>
  
  <p>Is <code>router.isActive</code> suitable for checking <em>'am I on route (x)?'</em> (e.g.: payments page) - regardless of hashstates, query params <em>and secondary routes</em>.</p>
  
  <p>Should <code>router.isActive</code> be the right service/call to deduce this? Or is it intended for something simpler. Is there an alternative? Should write my own service?</p>
  
  <p>E.g.:</p>
  
  <ul>
  <li>When on <code>/second</code>, <code>router.isActive('second', true)</code> === true 
  
  <ul>
  <li>(good)</li>
  </ul></li>
  <li>When on <code>second(modal:my-modal)</code>, <code>router.isActive('second', true)</code> === false 
  
  <ul>
  <li><strong>The issue:</strong> This function is now no longer useful to determine if I'm on the <em>second</em> page</li>
  </ul></li>
  <li>When on <code>/second</code>, <code>router.isActive('', false)</code> === true. (non-exact matches return true parent/child states</li>
  </ul>
  
  <p>I've created a <a href="http://embed.plnkr.co/ZDSzer/" rel="noreferrer">plnkr proof of concept</a>, for easier testing:</p>
  
  <p><a href="https://i.stack.imgur.com/cNrZt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cNrZt.png" alt="enter image description here"></a></p>