
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/pipes/slice_pipe.ts#L9-L90">angular2/src/core/pipes/slice_pipe.ts (line 9)</a>

:markdown
  Creates a new List or String containing only a subset (slice) of the
  elements.
  
  The starting index of the subset to return is specified by the `start` parameter.
  
  The ending index of the subset to return is specified by the optional `end` parameter.
  
  # Usage
  
      expression | slice:start[:end]
  
  All behavior is based on the expected behavior of the JavaScript API
  Array.prototype.slice() and String.prototype.slice()
  
  Where the input expression is a [List] or [String], and `start` is:
  
  - **a positive integer**: return the item at _start_ index and all items after
  in the list or string expression.
  - **a negative integer**: return the item at _start_ index from the end and all items after
  in the list or string expression.
  - **`|start|` greater than the size of the expression**: return an empty list or string.
  - **`|start|` negative greater than the size of the expression**: return entire list or
  string expression.
  
  and where `end` is:
  
  - **omitted**: return all items until the end of the input
  - **a positive integer**: return all items before _end_ index of the list or string
  expression.
  - **a negative integer**: return all items before _end_ index from the end of the list
  or string expression.
  
  When operating on a [List], the returned list is always a copy even when all
  the elements are being returned.
  
  # Examples
  
  ## List Example
  
  Assuming `var collection = ['a', 'b', 'c', 'd']`, this `ng-for` directive:
  
      <li *ng-for="var i in collection | slice:1:3">{{i}}</li>
  
  produces the following:
  
      <li>b</li>
      <li>c</li>
  
  ## String Examples
  
      {{ 'abcdefghij' | slice:0:4 }}       // output is 'abcd'
      {{ 'abcdefghij' | slice:4:0 }}       // output is ''
      {{ 'abcdefghij' | slice:-4 }}      // output is 'ghij'
      {{ 'abcdefghij' | slice:-4,-2 }}      // output is 'gh'
      {{ 'abcdefghij' | slice: -100 }}    // output is 'abcdefghij'
      {{ 'abcdefghij' | slice: 100 }}    // output is ''
  
  

.l-main-section
  h2 Annotations
  .l-sub-section
    h3.annotation Pipe
    pre.prettyprint
      code.
        @Pipe({name: &#39;slice&#39;})


  .l-sub-section
    h3.annotation Injectable
    pre.prettyprint
      code.
        @Injectable()


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

    
    pre.prettyprint
      code.
        transform(value: any, args?: any[])
    
    :markdown





  .l-sub-section
    h3#supports supports

    
    pre.prettyprint
      code.
        supports(obj: any)
    
    :markdown




