当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript MapWrapper.contains方法代码示例

本文整理汇总了TypeScript中angular2/src/facade/collection.MapWrapper.contains方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MapWrapper.contains方法的具体用法?TypeScript MapWrapper.contains怎么用?TypeScript MapWrapper.contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在angular2/src/facade/collection.MapWrapper的用法示例。


在下文中一共展示了MapWrapper.contains方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

 it('should delegate event bindings to the first plugin supporting the event', () => {
   var element = el('<div></div>');
   var clickHandler = (e) => e;
   var dblClickHandler = (e) => e;
   var plugin1 = new FakeEventManagerPlugin(['dblclick']);
   var plugin2 = new FakeEventManagerPlugin(['click', 'dblclick']);
   var manager = new EventManager([plugin1, plugin2], new FakeNgZone());
   manager.addEventListener(element, 'click', clickHandler);
   manager.addEventListener(element, 'dblclick', dblClickHandler);
   expect(MapWrapper.contains(plugin1._nonBubbleEventHandlers, 'click')).toBe(false);
   expect(MapWrapper.get(plugin2._nonBubbleEventHandlers, 'click')).toBe(clickHandler);
   expect(MapWrapper.contains(plugin2._nonBubbleEventHandlers, 'dblclick')).toBe(false);
   expect(MapWrapper.get(plugin1._nonBubbleEventHandlers, 'dblclick')).toBe(dblClickHandler);
 });
开发者ID:188799958,项目名称:angular,代码行数:14,代码来源:event_manager_spec.ts

示例2: set

 set(name, value) {
   if (MapWrapper.contains(this.current, name)) {
     MapWrapper.set(this.current, name, value);
   } else {
     throw new BaseException('Setting of new keys post-construction is not supported.');
   }
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:locals.ts

示例3: parameters

 parameters(typeOfFunc) {
   if (MapWrapper.contains(this._typeInfo, typeOfFunc)) {
     return MapWrapper.get(this._typeInfo, typeOfFunc)["parameters"];
   } else {
     return this.reflectionCapabilities.parameters(typeOfFunc);
   }
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:reflector.ts

示例4: annotations

 annotations(typeOfFunc): List<any> {
   if (MapWrapper.contains(this._typeInfo, typeOfFunc)) {
     return MapWrapper.get(this._typeInfo, typeOfFunc)["annotations"];
   } else {
     return this.reflectionCapabilities.annotations(typeOfFunc);
   }
 }
开发者ID:Bogatinov,项目名称:angular,代码行数:7,代码来源:reflector.ts

示例5: factory

 factory(type: Type): Function {
   if (MapWrapper.contains(this._typeInfo, type)) {
     return MapWrapper.get(this._typeInfo, type)["factory"];
   } else {
     return this.reflectionCapabilities.factory(type);
   }
 }
开发者ID:Bogatinov,项目名称:angular,代码行数:7,代码来源:reflector.ts

示例6: setter

 setter(name: string): SetterFn {
   if (MapWrapper.contains(this._setters, name)) {
     return MapWrapper.get(this._setters, name);
   } else {
     return this.reflectionCapabilities.setter(name);
   }
 }
开发者ID:Bogatinov,项目名称:angular,代码行数:7,代码来源:reflector.ts

示例7: method

 method(name: string): MethodFn {
   if (MapWrapper.contains(this._methods, name)) {
     return MapWrapper.get(this._methods, name);
   } else {
     return this.reflectionCapabilities.method(name);
   }
 }
开发者ID:Bogatinov,项目名称:angular,代码行数:7,代码来源:reflector.ts

示例8: getter

 getter(name) {
   if (MapWrapper.contains(this._getters, name)) {
     return MapWrapper.get(this._getters, name);
   } else {
     return this.reflectionCapabilities.getter(name);
   }
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:reflector.ts

示例9: annotations

 annotations(typeOrFunc): List<any> {
   if (MapWrapper.contains(this._typeInfo, typeOrFunc)) {
     return this._getTypeInfoField(typeOrFunc, "annotations", []);
   } else {
     return this.reflectionCapabilities.annotations(typeOrFunc);
   }
 }
开发者ID:CADBOT,项目名称:angular,代码行数:7,代码来源:reflector.ts

示例10: interfaces

 interfaces(type): List<any> {
   if (MapWrapper.contains(this._typeInfo, type)) {
     return this._getTypeInfoField(type, "interfaces", []);
   } else {
     return this.reflectionCapabilities.interfaces(type);
   }
 }
开发者ID:CADBOT,项目名称:angular,代码行数:7,代码来源:reflector.ts


注:本文中的angular2/src/facade/collection.MapWrapper.contains方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。