Adding ternary operator in ng-route otherwise condition
<p>I want to add one ternary condition to otherwise in ng-route. please find below:</p>

<pre><code>otherwise({
    redirectTo: $window.location.pathname === '/flight/' || '/air/' ? '/air' : '/hotel'
         });
</code></pre>

<p>but unfortunatley if i type something in url then it always goes to '/air'.</p>

<p>is there something wrong with above code?</p>