
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/directives/ng_style.ts#L9-L65">angular2/src/core/directives/ng_style.ts (line 9)</a>

:markdown
  Adds or removes styles based on an {expression}.
  
  When the expression assigned to `ng-style` evaluates to an object, the corresponding element
  styles are updated. Style names to update are taken from the object keys and values - from the
  corresponding object values.
  
  # Example:
  
  ```
  <div [ng-style]="{'text-align': alignExp}"></div>
  ```
  
  In the above example the `text-align` style will be updated based on the `alignExp` value
  changes.
  
  # Syntax
  
  - `<div [ng-style]="{'text-align': alignExp}"></div>`
  - `<div [ng-style]="styleExp"></div>`
  
  

.l-main-section
  h2 Annotations
  .l-sub-section
    h3.annotation Directive
    pre.prettyprint
      code.
        @Directive({selector: &#39;[ng-style]&#39;, properties: [&#39;rawStyle: ng-style&#39;]})


.l-main-section
  h2 Members
  .l-sub-section
    h3#constructor constructor

    
    pre.prettyprint
      code.
        constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer)
    
    :markdown




  .l-sub-section
    h3#rawStyle rawStyle

    
    :markdown





  .l-sub-section
    h3#doCheck doCheck

    
    pre.prettyprint
      code.
        doCheck()
    
    :markdown




