In my application, i am trying to load the routes dynamically. But i am hard-coding the routes right now. The idea is to read the routes from a JSON file because the routing will be controlled by a module, which we call as shell, and other applications or modules can get hooked to the shell. The individual modules will write their path and other route information on a JSON file. I have a service in my shell to read the JSON. This service is invoked from a component and then the setter method of the service gets called to save the routes in a variable. There is a getter method as well in the service to give the routes info. The problem i am facing is, how can i inject a service in my router file. Or, if there is any other way to achieve the same.
-- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
