19 lines
1.4 KiB
HTML
Executable file
19 lines
1.4 KiB
HTML
Executable file
<a href="http://github.com/angular/angular.js/edit/master/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable=""></code>
|
|
<div><span class="hint"></span>
|
|
</div>
|
|
</h1>
|
|
<div><div class="developer-guide-page developer-guide-about-mvc-in-angular-understanding-the-view-component-page"><p>In Angular, the view is the DOM loaded and rendered in the browser, after Angular has transformed
|
|
the DOM based on information in the template, controller and model.</p>
|
|
<p><img src="img/guide/about_view_final.png"></p>
|
|
<p>In the Angular implementation of MVC, the view has knowledge of both the model and the controller.
|
|
The view knows about the model where two-way data-binding occurs. The view has knowledge of the
|
|
controller through Angular directives, such as <a href="api/ng.directive:ngController"><code>ngController</code></a> and <a href="api/ngRoute.directive:ngView">ngView</a>, and through bindings of this form:
|
|
<code>{{someControllerFunction()}}</code>. In these ways, the view can call functions in an associated
|
|
controller function.</p>
|
|
<h3>Related Topics</h3>
|
|
<ul>
|
|
<li><a href="guide/dev_guide.mvc">About MVC in Angular</a></li>
|
|
<li><a href="guide/dev_guide.mvc.understanding_model">Understanding the Model Component</a></li>
|
|
<li><a href="guide/dev_guide.mvc.understanding_controller">Understanding the Controller Component</a></li>
|
|
</ul>
|
|
</div></div>
|