My routing code
The called html interface is marked in red and the controller has been obtained again. When it is obtained on the html, there is no problem and the data can be displayed normally. After deleting the controller, the data cannot be obtained on the page, but my The controller can also load data normally
The following is my controller code
I now want to call the controller directly on the route instead of adding it to the html page. Is there any solution?
LZ You should read the usage of Controller and Controller AS in the AngularJS documentation~
state is configured as:
Then delete ng-controller in your html.