Angular1 - ng-view

angular1

// Angular 1 - ng-view:

The ng-view attribute tells Angular where we wish to inject HTML based 
on the URL a user visits. In this sample project, we'll want to have an inbox 
view. When a user visits the /inbox URL our (yet to be created) inbox.html file 
would be injected inside the ng-view. The inbox.html file would also have it's 
corresponding controller (InboxCtrl).

<html ng-app="myApp">
    <head>
    </head>
    <body>
        <div ng-view></div>
    </body>
</html>

Angular encourages the "single page application" methodology, which means we 
never get a full page refresh, all "pages" are injected content via XHR (Ajax). 
Of course these aren't "pages" as such, they're "views" - which are loaded 
depending on the URLs a user visits or the application state.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License