forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_guide.mvc.understanding_view.html
21 lines (17 loc) · 1.4 KB
/
dev_guide.mvc.understanding_view.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<h1>Developer Guide: About MVC in Angular: Understanding the View Component</h1>
<div class="developer-guide-about-mvc-in-angular-understanding-the-view-component"><fieldset class="workInProgress"><legend>Work in Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.</fieldset>
<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/angular.directive.ng:controller"><code>ng:controller</code></a> and <a href="#!/api/angular.widget.ng:view"><code>ng:view</code></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>