Develop a single-page application using Angualr, and use ui-router for routing.
When I put ui-view
on the body
tag, the following error message appeared:
When I place ui-view
as a tag <ui-view></ui-view>
alone, this error does not appear. What is the reason?
Did you also put ngApp on the body?
ngApp automatically starts angular. If the view is started multiple times, it will report the error displayed to you. You will understand if you look at the source code of angular
By the way, I tested it myself by placing ui-view on the body and no error was reported. The premise is that I placed ngApp on the html