Note that there are some explanatory texts on larger screens.

plurals
  1. POangularjs ui-router - how to build master state which is global across app
    primarykey
    data
    text
    <pre><code>&lt;html ng-app="app"&gt; &lt;head&gt; ... &lt;/head&gt; &lt;body&gt; &lt;div id="header"&gt;&lt;/div&gt; &lt;div id="notification"&gt;&lt;/div&gt; &lt;div id="container"&gt;&lt;/div&gt; &lt;div id="footer"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>With the given structure of the app (derived from angular-app):</p> <ul> <li>header: Here the site navigation, login/out toolbar etc comes in. This is dynamic and has it's own Controller</li> <li>notification: Global notification container. </li> <li>container: This used to be my <code>&lt;ng-view&gt;</code>. So this is where all other modules loads in.</li> <li>footer: Global footer.</li> </ul> <p>How do the state hierarchy looks like? I've gone through the example which shows a single module (contacts) but typically an app would have a global (root) state and inside the root state other module states are rendered.</p> <p>What I'm thinking is my <code>app</code> module probably have the <code>root</code> state and then each module should have it's own state and I have to <em>inherit</em> from <code>root</code> state. Am I right?</p> <p>Also from <code>ui-state</code> example, they have used both <code>$routeProvider</code> and <code>$urlRouterProvider</code> as well as <code>$stateProvider</code> has url defined. My understand was <code>$stateProvide</code> also handles routing. If I'm wrong, which provider should I use for routing?</p> <p><strong>EDIT</strong>: <a href="http://plnkr.co/edit/wqKsKwFq1nxRQ3H667LU?p=preview" rel="noreferrer">http://plnkr.co/edit/wqKsKwFq1nxRQ3H667LU?p=preview</a></p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload