I am trying to load the routes from a JSON file, as i do not want to hard 
code them and load the routes lazily. I am reading the JSON file using a 
service which is injected in a component. This service has a getter and a 
setter method. The setter is called from the component which will have a 
http.get call to read the JSON and set the values in some variable. The 
getter method is to get that variable which has this routes array. Now, how 
do i inject this service in the router file in order to call this getter? 
Or is there any other better way, using which i can load the routes from 
JSON?

-- 
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.

Reply via email to