p.location-badge.
exported from angular2/annotations
defined in angular2/src/core/annotations/decorators.ts (line 294)
:markdown
Query
factory for creating annotations, decorators or DSL.
## Example as TypeScript Decorator
```
import {Query, QueryList, Component, View} from "angular2/angular2";
@Component({...})
@View({...})
class MyComponent {
constructor(@Query(SomeType) queryList: QueryList) {
...
}
}
```
## Example as ES5 DSL
```
var MyComponent = ng
.Component({...})
.View({...})
.Class({
constructor: [new ng.Query(SomeType), function(queryList) {
...
}]
})
```
## Example as ES5 annotation
```
var MyComponent = function(queryList) {
...
};
MyComponent.annotations = [
new ng.Component({...})
new ng.View({...})
]
MyComponent.parameters = [
[new ng.Query(SomeType)]
]
```