
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/metadata/di.ts#L9-L50">angular2/src/core/metadata/di.ts (line 9)</a>

:markdown
  Specifies that a constant attribute value should be injected.
  
  The directive can inject constant string literals of host element attributes.
  
  ## Example
  
  Suppose we have an `<input>` element and want to know its `type`.
  
  ```html
  <input type="text">
  ```
  
  A decorator can inject string literal `text` like so:
  
  ```javascript
  @Directive({
    selector: `input'
  })
  class InputDirective {
    constructor(@Attribute('type') type) {
      // type would be `text` in this example
    }
  }
  ```
  
  

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

    
    pre.prettyprint
      code.
        constructor(attributeName: string)
    
    :markdown




  .l-sub-section
    h3#attributeName attributeName

    
    :markdown





  .l-sub-section
    h3#token token

    
    :markdown





  .l-sub-section
    h3#toString toString

    
    pre.prettyprint
      code.
        toString()
    
    :markdown




