1

I have a web application that is separated into two distinct applications and each has their own routing. These application are arranged in tabs at the root of the application. Each will have a set of tabs for application specific functionality. Each of these tabs are split into three panels and use secondary named routes to display the view in each. Here is stackblitz mock up:

https://stackblitz.com/edit/angular-by3crx?file=src%2Fapp%2Fapp.module.ts

So at the top level you have the apps Fish Cleaner and Turtle Scrubber. Only Fish Cleaner does anything right now. And if you click Fish Cleaner you have the options of Creation and Configuration. Clicking creation will bring up the Cleaner Creation options, arranged Details - Cleaner - Properties. If the user clicks creation again the secondary outlets disappear since they are activated in the ngAfterViewInit and this will not be called again for subsequent navigations to the same URL. The question is, is there anyway to reload these secondary outlets when the a user navigates in this fashion?

paj7777
  • 311
  • 1
  • 4
  • 13
  • See the answer to a similar question: https://stackoverflow.com/a/40983262/7776688 – IEE1394 Apr 17 '19 at 18:33
  • The marked answer to this question pertains to refreshing of data whereas my question is about re-activating secondary outlets. – paj7777 Apr 18 '19 at 05:43
  • https://angular.io/api/core/AfterViewInit "A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated." ... so you have to instanciate the view eighter by reloadig or by having a service with provides the data again after you trigger it from outside .. – IEE1394 Apr 18 '19 at 06:04
  • That's fine but at this stage there is no data being provided, so the other option is reloading, how do you reload at the point when the navigation is triggered? I have tried out the redirect hack further down in answer to the other question, this seems to work for now. – paj7777 Apr 18 '19 at 06:28
  • so in that case reloading is maybe the best option - afaik – IEE1394 Apr 18 '19 at 06:45

0 Answers0