Hello, I have a design question, for which I don't seem to find anyone who has done that before...
The case: I have a website, which is called with 3 routeParamters. E.g. Index.html#/ctrl1/firstPara/SecondPara/ThirdPara Index.html#/ctrl2/firstPara/SecondPara/ThirdPara ... On my Index.html I have a "base" Controller, which constantly checks the routeParameters (onRouteChangeSuccess). The parameters are some kind of code, which is needed for downloading information from a WebAPI. That does a service in the base controller and the base controller saves the retrieved data to the scope. The controller has also a $watch on the scope. Everytime the user changes the data, it has to be saved to local storage. So, on my Index.html I also have ngView, which loads the different templates with different controllers. They all depend on the data, which was saved to the scope by the base controller. Someone mentioned, that it wouldn't be a good style, having two controllers, one depending on the other. I COULD write a service, which would do the whole thing that does my base controller currently, but it would be a lot of code repetition in my other controllers, wouldn't it? What are your recommendations? I'm new to angular, so any advice will do. I probably even have a somewhat strange way to solve that problem and it could be a lot easier... Eva -- You received this message because you are subscribed to the Google Groups "AngularJS" 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 http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
