QueryFactory

export interface QueryFactory

exported from angular2/core defined in angular2/src/core/metadata.ts (line 349)

QueryMetadata factory for creating annotations, decorators or DSL.

Example as TypeScript Decorator

import {Query, QueryList, Component} from "angular2/core"; @Component({...}) class MyComponent { constructor(@Query(SomeType) queryList: QueryList<SomeType>) { ... } }

Example as ES5 DSL

var MyComponent = ng .Component({...}) .Class({ constructor: [new ng.Query(SomeType), function(queryList) { ... }] })

Example as ES5 annotation

var MyComponent = function(queryList) {
  ...
};

MyComponent.annotations = [
  new ng.Component({...})
]
MyComponent.parameters = [
  [new ng.Query(SomeType)]
]