Page display needs to be controlled by the controller, so the data must pass through the controller and then be presented to the page. On the contrary, you can omit the service, inject $http and $q directly into the controller, and move the service code to the controller. But this function is feasible, but the actual code structure is messed up. So this is not recommended. As for not having a controller, it’s not feasible.
No, it’s not recommended either.
This breaks the layering of MVC.
But in theory you can write a directive implementation specifically for this
Page display needs to be controlled by the controller, so the data must pass through the controller and then be presented to the page. On the contrary, you can omit the service, inject $http and $q directly into the controller, and move the service code to the controller. But this function is feasible, but the actual code structure is messed up. So this is not recommended. As for not having a controller, it’s not feasible.