I want to use the controller in the page js to call a method in a controller in the bus js. Is this possible? $rootscope is not allowed to be added, and public js is not allowed to be changed. It is said that it is not allowed to be moved in the framework. .
三叔2017-06-22 11:55:16
The core of angular is service, but there is no need for service. Write common methods in the service and then call them via dependency injection.
伊谢尔伦2017-06-22 11:55:16
You can talk about your specific functional scenario. There must be something wrong with the method you use.
黄舟2017-06-22 11:55:16
You can register a service, write the method you want in it, and then inject the service into the controller and you can call it