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iBAAiB,AAAC,YAAkB,KAAK,MAAmB,CAyD/D;AACP,KAAG,cAAc,EAAI,cAAY,CAAC;AACpC,AA3DsC,CAAA;AAAxC,AAAI,EAAA,uBAAoC,CAAA;AAAxC,AAAC,eAAc,YAAY,CAAC,AAAC,aA6D3B,GAAI,MAAI,EAAI;AAKV,SAAO,KAAG,CAAC;EACb,MAd6B,qBAAmB,CApDM;AADxD,KAAK,eAAe,AAAC,0BACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,cAsDvB,MAAI,AAAC,EAAC,EAtDwC;EAAC,CAAC,CAAC,CAAC;AADrD,AAAI,EAAA,QA6EG,SAAM,MAAI,CAGH,SAAQ,CAAG;AACrB,AAjFJ,gBAAc,iBAAiB,AAAC,QAAkB,KAAK,MAAmB,CAiF/D;AACP,KAAG,UAAU,EAAI,UAAQ,CAAC;AAC5B,AAnFsC,CAAA;AAAxC,AAAI,EAAA,eAAoC,CAAA;AAAxC,AAAC,eAAc,YAAY,CAAC,AAAC,eA6EF,qBAAmB,CA5EU;AADxD,KAAK,eAAe,AAAC,sBACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,cA8EvB,MAAI,AAAC,EAAC,EA9EwC;EAAC,CAAC,CAAC,CAAC;AAoFrD","file":"angular2/src/core/annotations/di.js","sourcesContent":["import {CONST} from 'angular2/src/facade/lang';\nimport {DependencyAnnotation} from 'angular2/di';\n\n/**\n * Specifies that a function for setting host properties should be injected.\n *\n * NOTE: This is changing pre 1.0.\n *\n * The directive can inject a property setter that would allow setting this property on the host element.\n *\n * @exportedAs angular2/annotations\n */\nexport class PropertySetter extends DependencyAnnotation {\n propName: string;\n @CONST()\n constructor(propName) {\n super();\n this.propName = propName;\n }\n\n get token() {\n return Function;\n }\n}\n\n/**\n * Specifies that a constant attribute value should be injected.\n *\n * The directive can inject constant string literals of host element attributes.\n *\n * ## Example\n *\n * Suppose we have an `<input>` element and want to know its `type`.\n *\n * ```html\n * <input type=\"text\">\n * ```\n *\n * A decorator can inject string literal `text` like so:\n *\n * ```javascript\n * @Decorator({\n * selector: `input'\n * })\n * class InputDecorator {\n * constructor(@Attribute('type') type) {\n * // type would be `text` in this example\n * }\n * }\n * ```\n *\n * @exportedAs angular2/annotations\n */\nexport class Attribute extends DependencyAnnotation {\n attributeName: string;\n @CONST()\n constructor(attributeName) {\n super();\n this.attributeName = attributeName;\n }\n\n get token() {\n //Normally one would default a token to a type of an injected value but here\n //the type of a variable is \"string\" and we can't use primitive type as a return value\n //so we use instance of Attribute instead. This doesn't matter much in practice as arguments\n //with @Attribute annotation are injected by ElementInjector that doesn't take tokens into account.\n return this;\n }\n}\n\n/**\n * Specifies that a {@link QueryList} should be injected.\n *\n * See {@link QueryList} for usage and example.\n *\n * @exportedAs angular2/annotations\n */\nexport class Query extends DependencyAnnotation {\n directive;\n @CONST()\n constructor(directive) {\n super();\n this.directive = directive;\n }\n}\n"]}