angular2
Version:
Angular 2 - a web framework for modern web apps
1 lines • 3.06 kB
Source Map (JSON)
{"version":3,"sources":["element_binder.js"],"names":[],"mappings":"AAAA;AAAA,KAAO,EAAC,GAAE;AAAG,QAAM;AAAG,UAAQ;AAAG,cAAY,CAAC,KAAO,2BAAyB,CAAC;AAC/E,UAAY,SAAO,CAAA,IAAO,qBAAmB,CAAC;AAC9C,KAAO,EAAC,gBAAe,CAAC,KAAO,qBAAmB,CAAC;AACnD,KAAO,EAAC,IAAG;AAAG,UAAQ,CAAC,KAAO,iCAA+B,CAAC;AAC9D,UAAY,WAAS,CAAA,IAAO,SAAO,CAAC;AAEpC,KAAO,MAAM,cAAY;AASvB,YAAU,CACR,KAAI,AAAI,CAAG,CAAA,MAAK,AAAc,CAAG,CAAA,gBAAe,AAAK,CACrD,CAAA,oBAAmB,AAA+B,CAAG,CAAA,kBAAiB,AAAiB,CACvF,CAAA,iBAAgB,AAAiB,CAAG;AAlBxC,SAAK,cAAc,OAgBT,IAAE,SAAU,cAAY,mBAAqB,IAAE,uBAC/B,CAAA,QAAO,qBAAqB,qBAAsB,iBAAe,oBACrE,iBAAe,CAlBC,CAAA;AAmBlC,OAAI,OAAM,AAAC,CAAC,KAAI,CAAC,CAAG;AAClB,UAAM,IAAI,cAAY,AAAC,CAAC,yBAAwB,CAAC,CAAC;IACpD;AAAA,AAEA,OAAG,qBAAqB,EAAI,qBAAmB,CAAC;AAChD,OAAG,mBAAmB,EAAI,mBAAiB,CAAC;AAC5C,OAAG,kBAAkB,EAAI,kBAAgB,CAAC;AAC1C,OAAG,OAAO,EAAI,OAAK,CAAC;AACpB,OAAG,MAAM,EAAI,MAAI,CAAC;AAClB,OAAG,iBAAiB,EAAI,iBAAe,CAAC;AAExC,OAAG,cAAc,EAAI,KAAG,CAAC;AAEzB,OAAG,gBAAgB,EAAI,KAAG,CAAC;EAC7B;AAAA,AAEA,mBAAiB,CAAE,AAAD,CAAG;AACnB,SAAO,CAAA,SAAQ,AAAC,CAAC,IAAG,mBAAmB,CAAC,CAAA,EAAK,CAAA,SAAQ,AAAC,CAAC,IAAG,gBAAgB,CAAC,CAAC;EAC9E;AAAA,AAEA,oBAAkB,CAAE,AAAD,CAAG;AACpB,SAAO,CAAA,SAAQ,AAAC,CAAC,IAAG,mBAAmB,CAAC,CAAA,EAAK,CAAA,OAAM,AAAC,CAAC,IAAG,gBAAgB,CAAC,CAAC;EAC5E;AAAA,AACF;AAAA,AA1CA,KAAK,eAAe,AAAC,6BACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAehB,GAAE,IAAU,aAAY,IAAqB,GAAE,IAC/B,QAAO,qBAAqB,IAAsB,gBAAe,IACrE,gBAAe,GAjBY;EAAC,CAAC,CAAC,CAAC;AA0CrD","file":"angular2/src/core/compiler/element_binder.es6","sourcesContent":["import {int, isBlank, isPresent, BaseException} from 'angular2/src/facade/lang';\nimport * as eiModule from './element_injector';\nimport {DirectiveBinding} from './element_injector';\nimport {List, StringMap} from 'angular2/src/facade/collection';\nimport * as viewModule from './view';\n\nexport class ElementBinder {\n protoElementInjector:eiModule.ProtoElementInjector;\n componentDirective:DirectiveBinding;\n viewportDirective:DirectiveBinding;\n nestedProtoView: viewModule.AppProtoView;\n hostListeners:StringMap;\n parent:ElementBinder;\n index:int;\n distanceToParent:int;\n constructor(\n index:int, parent:ElementBinder, distanceToParent: int,\n protoElementInjector: eiModule.ProtoElementInjector, componentDirective:DirectiveBinding,\n viewportDirective:DirectiveBinding) {\n if (isBlank(index)) {\n throw new BaseException('null index not allowed.');\n }\n\n this.protoElementInjector = protoElementInjector;\n this.componentDirective = componentDirective;\n this.viewportDirective = viewportDirective;\n this.parent = parent;\n this.index = index;\n this.distanceToParent = distanceToParent;\n // updated later when events are bound\n this.hostListeners = null;\n // updated later, so we are able to resolve cycles\n this.nestedProtoView = null;\n }\n\n hasStaticComponent() {\n return isPresent(this.componentDirective) && isPresent(this.nestedProtoView);\n }\n\n hasDynamicComponent() {\n return isPresent(this.componentDirective) && isBlank(this.nestedProtoView);\n }\n}\n"]}