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


TypeScript MapWrapper.get方法代码示例

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


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

示例1: _checkOverrideable

  /**
   * Once a component has been compiled, the AppProtoView is stored in the compiler cache.
   *
   * Then it should not be possible to override the component configuration after the component
   * has been compiled.
   *
   * @param {Type} component
   */
  _checkOverrideable(component: Type): void {
    var cached = MapWrapper.get(this._viewCache, component);

    if (isPresent(cached)) {
      throw new BaseException(
          `The component ${stringify(component)} has already been compiled, its configuration can not be changed`);
    }
  }
开发者ID:AsherBarak,项目名称:angular,代码行数:16,代码来源:template_resolver_mock.ts

示例2: getComponentId

export function getComponentId(componentStringId) {
  var id = MapWrapper.get(_componentUIDs, componentStringId);
  if (isBlank(id)) {
    id = _nextComponentUID++;
    MapWrapper.set(_componentUIDs, componentStringId, id);
  }
  return id;
}
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:util.ts

示例3:

 ListWrapper.forEach(params, (param: string) => {
   var split: List<string> = StringWrapper.split(param, '=');
   var key = ListWrapper.get(split, 0);
   var val = ListWrapper.get(split, 1);
   var list = MapWrapper.get(map, key) || ListWrapper.create();
   ListWrapper.push(list, val);
   MapWrapper.set(map, key, list);
 });
开发者ID:B-Thapa,项目名称:angular,代码行数:8,代码来源:url_search_params.ts

示例4: resolve

 resolve(component) {
   var template = MapWrapper.get(this._cache, component);
   if (isBlank(template)) {
     template = this._resolve(component);
     MapWrapper.set(this._cache, component, template);
   }
   return template;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:template_resolver.ts

示例5: _registerViewContainer

 _registerViewContainer(value, container) {
   var containers = MapWrapper.get(this._valueViewContainers, value);
   if (isBlank(containers)) {
     containers = ListWrapper.create();
     MapWrapper.set(this._valueViewContainers, value, containers);
   }
   ListWrapper.push(containers, container);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:switch.ts

示例6: get

  get(url: string): Promise<string> {
    var response = MapWrapper.get(this._responses, url);
    if (isBlank(response)) {
      return PromiseWrapper.reject('xhr error', null);
    }

    return PromiseWrapper.resolve(response);
  }
开发者ID:188799958,项目名称:angular,代码行数:8,代码来源:emulated_scoped_shadow_dom_strategy_spec.ts

示例7: _addPartial

 _addPartial(map, name) {
   var matcher = MapWrapper.get(map, name);
   if (isBlank(matcher)) {
     matcher = new SelectorMatcher();
     MapWrapper.set(map, name, matcher);
   }
   return matcher;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:selector.ts

示例8: setLocal

 setLocal(contextName: string, value): void {
   if (!this.hydrated()) throw new BaseException('Cannot set locals on dehydrated view.');
   if (!MapWrapper.contains(this.proto.variableBindings, contextName)) {
     return;
   }
   var templateName = MapWrapper.get(this.proto.variableBindings, contextName);
   this.locals.set(templateName, value);
 }
开发者ID:188799958,项目名称:angular,代码行数:8,代码来源:view.ts

示例9: _addTerminal

 _addTerminal(map, name, selectable) {
   var terminalList = MapWrapper.get(map, name);
   if (isBlank(terminalList)) {
     terminalList = ListWrapper.create();
     MapWrapper.set(map, name, terminalList);
   }
   ListWrapper.push(terminalList, selectable);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:selector.ts

示例10: put

 put(record) {
   var key = getMapKey(record.item);
   var duplicates = MapWrapper.get(this.map, key);
   if (!isPresent(duplicates)) {
     duplicates = new _DuplicateItemRecordList();
     MapWrapper.set(this.map, key, duplicates);
   }
   duplicates.add(record);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:9,代码来源:iterable_changes.ts


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