Closed kobrigo closed 9 years ago
Is it ok if I create a pull request that changes the $commangularProvider to include all the functionality of the window.commangular?
Hi,
One problem I see if you include all the commangular namespace inside the $commangularProvider is you will need to create a config block everytime you need to create a command, because you need access to the $commangularProvider.
The second one is that Angular config blocks are used to config your application at startup. I don't see any reason to write your command bussines logic inside a config block. (This a personal design decision. What do you think?)
It would be posible because angular execute config blocks in the same order they are registered, but I dont think is a good design. I prefer to keep a commangular namespace.
To define a command I have to use the commangular object/namespace that is set on the window. why is that? I would rather have the contribution of commands through the provider as well. What problems did you encounter that made you place it outside of angular and on the main window?