{"version":3,"sources":["change_detector_ref.js"],"names":[],"mappings":"AAAA;AAAA,KAAK,iBAAiB,AAAC,CAAC,MAAK,QAAQ;mBAArC,EAAC,GAAE,YAAqB;AAAE,8BAAwB;IAAE,AAA9B,CAAC;AAAvB,WAAS,CAAT,EAAC,KAAI,CAAO,KAAG,AAAS,CAAC;CAAgC,CAAC;;;EAAlD,eAAa,EAArB,EAAC,iBAAoB,CAAA,OAAM,AAAC,gBAAkB,CACtC,CAAA,kBAAqB,2BAA2B,CAAA,kBAAqB,GAAK,EAAC,OAAM,iBAAmB,CAAC,AAD/D,CACgE;SAD9G,EAAC,gBAAoB,CAAA,OAAM,AAAC,eAAkB,CACtC,CAAA,iBAAqB,0BAA2B,CAAA,iBAAqB,GAAK,EAAC,OAAM,gBAAmB,CAAC,AAD/D,CACgE;AAAtG,aAAS;AAAG,WAAO;AAAG,eAAW;AADzC,AAAI,EAAA,oBAWG,SAAM,kBAAgB,CAGf,EAAC,AAAe,CAAG;AAC7B,KAAG,IAAI,EAAI,GAAC,CAAC;AACf,AAhBsC,CAAA;AAAxC,AAAC,eAAc,YAAY,CAAC,AAAC;AAqB3B,aAAW,CAAX,UAAa,AAAD,CAAG;AACb,OAAG,IAAI,0BAA0B,AAAC,EAAC,CAAC;EACtC;AAOA,OAAK,CAAL,UAAO,AAAD,CAAG;AACP,OAAG,IAAI,KAAK,EAAI,SAAO,CAAC;EAC1B;AAQA,SAAO,CAAP,UAAS,AAAD,CAAG;AACT,OAAG,IAAI,KAAK,EAAI,aAAW,CAAC;AAC5B,OAAG,aAAa,AAAC,EAAC,CAAC;EACrB;AAAA,KA3CmF;AAArF,KAAK,eAAe,AAAC,iCACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAaT,cAAa,GAbmB;EAAC,CAAC,CAAC,CAAC;AA4CrD","file":"angular2/src/change_detection/change_detector_ref.js","sourcesContent":["import {ChangeDetector} from './interfaces';\nimport {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';\n\n/**\n * Controls change detection.\n *\n * {@link ChangeDetectorRef} allows requesting checks for detectors that rely on observables. It also allows detaching and\n * attaching change detector subtrees.\n *\n * @exportedAs angular2/change_detection\n */\nexport class ChangeDetectorRef {\n  _cd:ChangeDetector;\n\n  constructor(cd:ChangeDetector) {\n    this._cd = cd;\n  }\n\n  /**\n   * Request to check all ON_PUSH ancestors.\n   */\n  requestCheck() {\n    this._cd.markPathToRootAsCheckOnce();\n  }\n\n  /**\n   * Detaches the change detector from the change detector tree.\n   *\n   * The detached change detector will not be checked until it is reattached.\n   */\n  detach() {\n    this._cd.mode = DETACHED;\n  }\n\n  /**\n   * Reattach the change detector to the change detector tree.\n   *\n   * This also requests a check of this change detector. This reattached change detector will be checked during the\n   * next change detection run.\n   */\n  reattach() {\n    this._cd.mode = CHECK_ALWAYS;\n    this.requestCheck();\n  }\n}\n"]}