search

Home  >  Q&A  >  body text

angular.js - ui-view problem in ui-router

base.html

<p ng-include="'topbar.html'"></p>
<p class='content'>
    <p ng-include="'sidebar.html'"></p>
    <p ui-view></p>
</p>

Now all content will be inserted into this ui-view, Login, registration, 404 too, then how can I make login, registration, 404 not be displayed in this ui-view, but the entire The page only shows login, only shows registration, only shows 404

黄舟黄舟2785 days ago602

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-15 16:58:48

    Have to giveui-view命名。你这里不命名,是相当于默认去渲染这个ui-view.
    Please refer to the official sample

                '': {
                    ...
                },

    Either it is named with this ''empty string as the key.

    reply
    0
  • Cancelreply