How to get access to URL data in new instance of Angular app -


i building application angular 4 needs open data in new tab. because require loading entire app again decided make functionality own mini-app. catch need able access parameters contained within url know data display. answers found question involve injecting router , calling this:

this.route.snapshot.parammap.get('id') 

this doesn't work me because not passing data within app instance of router , activated route have no idea coming from.

so after doing research found needed inject instance of router in main component accept url parameter. though wasn't passed same app, using router structure url parsing still works.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -