There are no "controllers" beyond Angular 1, but this app has "controllers" in that it has classes that intertalk (making my own word) with services. The controllers are sometimes handing into the constructors of components and sometimes wrap a component. They are the top of a Russian doll hierarchy of components in a smart components/dumb components pattern, talking to services while the nested items just talk up and talk down the Russian doll nestings with inputs and outputs. Something I have learned the hard way when I cannot seem to find the right service they might speak to is that a controller might speak to a controller to speak to a service. Some other advice for myself:
- When you drill into the base class that something has and you still cannot find what you are looking for there, check to see if there is a grandparent.
- If you cannot find a dance partner for a method call nonetheless, search the whole of the codebase for the name.
- If you want to know what is using a method and it seems to be many things, put console.log with some variation in each place and run the app to see what is making the call.
No comments:
Post a Comment