
p.location-badge.
  exported from <a href='../core'>angular2/core</a>
  defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/compiler/view_ref.ts#L15-L91">angular2/src/core/compiler/view_ref.ts (line 15)</a>

:markdown
  A reference to an Angular View.
  
  A View is a fundamental building block of Application UI. A View is the smallest set of
  elements which are created and destroyed together. A View can change properties on the elements
  within the view, but it can not change the structure of those elements.
  
  To change structure of the elements, the Views can contain zero or more <a href='ViewContainerRef-interface.html'><code>ViewContainerRef</code></a>s
  which allow the views to be nested.
  
  ## Example
  
  Given this template
  
  ```
  Count: {{items.length}}
  <ul>
    <li *ng-for="var item of items">{{item}}</li>
  </ul>
  ```
  
  The above example we have two <a href='ProtoViewRef-interface.html'><code>ProtoViewRef</code></a>s:
  
  Outter <a href='ProtoViewRef-interface.html'><code>ProtoViewRef</code></a>:
  ```
  Count: {{items.length}}
  <ul>
    <template ng-for var-item [ng-for-of]="items"></template>
  </ul>
  ```
  
  Inner <a href='ProtoViewRef-interface.html'><code>ProtoViewRef</code></a>:
  ```
    <li>{{item}}</li>
  ```
  
  Notice that the original template is broken down into two separate <a href='ProtoViewRef-interface.html'><code>ProtoViewRef</code></a>s.
  
  The outter/inner <a href='ProtoViewRef-interface.html'><code>ProtoViewRef</code></a>s are then assembled into views like so:
  
  ```
  <!-- ViewRef: outer-0 -->
  Count: 2
  <ul>
    <template view-container-ref></template>
    <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
    <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
  </ul>
  <!-- /ViewRef: outer-0 -->
  ```
  
  
.l-main-section
  h2 Members
  .l-sub-section
    h3#render render

    
    :markdown
      Return `RenderViewRef`
      
      





  .l-sub-section
    h3#renderFragment renderFragment

    
    :markdown
      Return `RenderFragmentRef`
      
      





  .l-sub-section
    h3#setLocal setLocal

    
    pre.prettyprint
      code.
        setLocal(contextName: string, value: any)
    
    :markdown
      Set local variable in a view.
      
      - `contextName` - Name of the local variable in a view.
      - `value` - Value for the local variable in a view.
      
      




