0

There's an example given in angular docs which shows how to organize a project so that you can have common nav bar at the top.

Is it possible to have something similar for another app, which has no nav bar on the landing page, but then once you click on a link /showresults/:id, everything else should have a navigation bar? The problem I think I'm having is that /showresults/:id can't have ng-view? Does this require 2 modules?

0

1 Answer 1

1

You could set a variable in your main page controller that doesn't exist anywhere else and then use ng-if

<main-nav ng-if="!homePageScopeVariable"><main-nav> 
Sign up to request clarification or add additional context in comments.

2 Comments

Sorry forgot to mention that I need the id in /showresults/:id to generate the navbar...I think I need to somehow make /showresults/:id page act as a parent main controller
can wrap navbar in directive then and depending on router used check params in the route change success event. Use those params to determine whether to hide/show navbar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.