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


TypeScript ListWrapper.find方法代码示例

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


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

示例1: _findMatching

function _findMatching(r: ProtoRecord, rs: List<ProtoRecord>) {
  return ListWrapper.find(rs, (rr) => rr.mode !== RecordType.DIRECTIVE_LIFECYCLE &&
                                      _sameDirIndex(rr, r) && rr.mode === r.mode &&
                                      rr.funcOrValue === r.funcOrValue &&
                                      rr.contextIndex === r.contextIndex && rr.name === r.name &&
                                      ListWrapper.equals(rr.args, r.args));
}
开发者ID:cedriclam,项目名称:angular,代码行数:7,代码来源:coalesce.ts

示例2: _getMatchingFactory

 private _getMatchingFactory(listOfFactories: PipeFactory[], type: string, obj: any): PipeFactory {
   var matchingFactory =
       ListWrapper.find(listOfFactories, pipeFactory => pipeFactory.supports(obj));
   if (isBlank(matchingFactory)) {
     throw new BaseException(`Cannot find '${type}' pipe supporting object '${obj}'`);
   }
   return matchingFactory;
 }
开发者ID:cedriclam,项目名称:angular,代码行数:8,代码来源:pipe_registry.ts

示例3: _findMatching

function _findMatching(r:ProtoRecord, rs:List<ProtoRecord>): ProtoRecord {
  return ListWrapper.find(rs, (rr) =>
    rr.mode === r.mode &&
    rr.funcOrValue === r.funcOrValue &&
    rr.contextIndex === r.contextIndex &&
    ListWrapper.equals(rr.args, r.args)
  );
}
开发者ID:tavwizard,项目名称:angular,代码行数:8,代码来源:coalesce.ts

示例4: find

 find(iterable: Object): IterableDifferFactory {
   var factory = ListWrapper.find(this.factories, f => f.supports(iterable));
   if (isPresent(factory)) {
     return factory;
   } else {
     throw new BaseException(`Cannot find a differ supporting object '${iterable}'`);
   }
 }
开发者ID:KenWilliamson,项目名称:Angular2HostedMobileApp,代码行数:8,代码来源:iterable_differs.ts

示例5: find

 find(kv: Object): KeyValueDifferFactory {
   var factory = ListWrapper.find(this.factories, f => f.supports(kv));
   if (isPresent(factory)) {
     return factory;
   } else {
     throw new BaseException(`Cannot find a differ supporting object '${kv}'`);
   }
 }
开发者ID:KenWilliamson,项目名称:Angular2HostedMobileApp,代码行数:8,代码来源:keyvalue_differs.ts

示例6: get

 get(type, obj, bpc) {
   var listOfConfigs = this.config[type];
   if (isBlank(listOfConfigs)) {
     throw new BaseException(`Cannot find a pipe for type '${type}' object '${obj}'`);
   }
   var matchingConfig = ListWrapper.find(listOfConfigs, (pipeConfig) => pipeConfig.supports(obj));
   if (isBlank(matchingConfig)) {
     throw new BaseException(`Cannot find a pipe for type '${type}' object '${obj}'`);
   }
   return matchingConfig.create(bpc);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:11,代码来源:pipe_registry.ts

示例7: get

  get(type: string, obj, cdRef: ChangeDetectorRef): Pipe {
    var listOfConfigs = this.config[type];
    if (isBlank(listOfConfigs)) {
      throw new BaseException(`Cannot find '${type}' pipe supporting object '${obj}'`);
    }

    var matchingConfig = ListWrapper.find(listOfConfigs, (pipeConfig) => pipeConfig.supports(obj));

    if (isBlank(matchingConfig)) {
      throw new BaseException(`Cannot find '${type}' pipe supporting object '${obj}'`);
    }

    return matchingConfig.create(cdRef);
  }
开发者ID:Dineshchse,项目名称:angular,代码行数:14,代码来源:pipe_registry.ts

示例8: _findMatching

function _findMatching(r: ProtoRecord, rs: List<ProtoRecord>) {
  return ListWrapper.find(rs, (rr) => rr.mode !== RECORD_TYPE_DIRECTIVE_LIFECYCLE &&
                                  rr.mode === r.mode && rr.funcOrValue === r.funcOrValue &&
                                  rr.contextIndex === r.contextIndex &&
                                  ListWrapper.equals(rr.args, r.args));
}
开发者ID:CADBOT,项目名称:angular,代码行数:6,代码来源:coalesce.ts

示例9:

 var lookupName = (item) => ListWrapper.last(ListWrapper.find(names, (pair) => pair[0] === item));
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:1,代码来源:element_injector_spec.ts

示例10: _findMatching

function _findMatching(r, rs) {
  return ListWrapper.find(rs, (rr) => rr.mode === r.mode && rr.funcOrValue === r.funcOrValue && rr.contextIndex === r.contextIndex && ListWrapper.equals(rr.args, r.args));
}
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:3,代码来源:coalesce.ts


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