angular.js - How does angularjs use ui-view to implement the 404 login registration page?
为情所困
为情所困 2017-05-15 17:02:36
0
2
551

Beginner to angularjs 1

Write

below index.html
// head css
<body ng-app>
    <p ui-view='nav'></p>
    <p ui-view='sidebar'></p>
    <p ui-view='content'></p>
    // js
</body>

If you log in, you can do this on this page. But for example, login and 404 page, I don’t need nav or sidebar

Should I put one on top of these three ui-views, or write one on top of the body?
Or should I use a variable, ng-if to hide nav or sidebar??
Or should I leave index.html aside and create a separate 404.html register.html, but isn’t this application a SPA?

为情所困
为情所困

reply all(2)
黄舟

Just have a <p ui-view></p>, and configure when to go to the 404 page in the routing.

習慣沉默

Main page

<body ng-app>
    <p ui-view="main></p>
    // js
</body>

Configure the corresponding route for page jump

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template