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


TypeScript ListWrapper.concat方法代码示例

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


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

示例1: expandedDomNodes

 expandedDomNodes() {
   var res = [];
   var roots = this._roots();
   for (var i = 0; i < roots.length; ++i) {
     var root = roots[i];
     if (isPresent(root.viewContainer)) {
       res = ListWrapper.concat(res, root.viewContainer.nodes());
     } else if (isPresent(root.content)) {
       res = ListWrapper.concat(res, root.content.nodes());
     } else {
       ListWrapper.push(res, root.node);
     }
   }
   return res;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:15,代码来源:light_dom.ts

示例2: nodes

 nodes() {
   var r = [];
   for (var i = 0; i < this._views.length; ++i) {
     r = ListWrapper.concat(r, this._views[i].nodes);
   }
   return r;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:view_container.ts

示例3: nodes

 nodes(): List</*node*/ any> {
   var r = [];
   for (var i = 0; i < this.views.length; ++i) {
     r = ListWrapper.concat(r, this.views[i].rootNodes);
   }
   return r;
 }
开发者ID:188799958,项目名称:angular,代码行数:7,代码来源:view_container.ts

示例4: insertChildrenAfter

 insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) {
   var siblingIndex = this.childNodes.indexOf(child);
   if (siblingIndex !== -1) {
     var previousChildren = this.childNodes.slice(0, siblingIndex + 1);
     var nextChildren = this.childNodes.slice(siblingIndex + 1);
     this.childNodes =
         ListWrapper.concat(ListWrapper.concat(previousChildren, newChildren), nextChildren);
     for (var i = 0; i < newChildren.length; ++i) {
       var newChild = newChildren[i];
       if (isPresent(newChild.parent)) {
         newChild.parent.removeChild(newChild);
       }
       newChild.parent = this;
     }
   }
 }
开发者ID:844496869,项目名称:angular,代码行数:16,代码来源:debug_node.ts

示例5: _createAppInjector

function _createAppInjector(appComponentType, bindings, zone) {
  if (isBlank(_rootInjector))
    _rootInjector = new Injector(_rootBindings);
  var mergedBindings = isPresent(bindings) ? ListWrapper.concat(_injectorBindings(appComponentType), bindings) : _injectorBindings(appComponentType);
  ListWrapper.push(mergedBindings, bind(VmTurnZone).toValue(zone));
  return _rootInjector.createChild(mergedBindings);
}
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:application.ts

示例6: createEventRecords

export function createEventRecords(definition: ChangeDetectorDefinition): EventBinding[] {
  // TODO: vsavkin: remove $event when the compiler handles render-side variables properly
  var varNames = ListWrapper.concat(['$event'], definition.variableNames);
  return definition.eventRecords.map(er => {
    var records = _ConvertAstIntoProtoRecords.create(er, varNames);
    var dirIndex = er.implicitReceiver instanceof DirectiveIndex ? er.implicitReceiver : null;
    return new EventBinding(er.eventName, er.elementIndex, dirIndex, records);
  });
}
开发者ID:lavinjj,项目名称:angular,代码行数:9,代码来源:proto_change_detector.ts

示例7: _createAppInjector

function _createAppInjector(appComponentType: Type, bindings: List<Type | Binding | List<any>>,
                            zone: NgZone): Injector {
  if (isBlank(_rootInjector)) _rootInjector = Injector.resolveAndCreate(_rootBindings);
  var mergedBindings: any[] =
      isPresent(bindings) ? ListWrapper.concat(_injectorBindings(appComponentType), bindings) :
                            _injectorBindings(appComponentType);
  mergedBindings.push(bind(NgZone).toValue(zone));
  return _rootInjector.resolveAndCreateChild(mergedBindings);
}
开发者ID:cedriclam,项目名称:angular,代码行数:9,代码来源:application.ts

示例8: diff

function diff(actual: string[], expected: string[]): string[] {
  ListWrapper.sort(actual, compareIgnoreLang);
  ListWrapper.sort(expected, compareIgnoreLang);
  let mode = IS_DART ? "dart" : "js";
  let missing = actual.filter(i => expected.indexOf(i) < 0 && expected.indexOf(`${i}:${mode}`) < 0)
                    .map(s => `+${s}`);
  let extra = expected.filter(i => shouldIgnore(i) ? false : (actual.indexOf(stripLang(i)) < 0))
                  .map(s => `-${s}`);
  return ListWrapper.concat(missing, extra);
}
开发者ID:ChinnasamyM,项目名称:angular,代码行数:10,代码来源:public_api_spec.ts

示例9: _report

 _report(state: SampleState, metricValues: StringMap<string, any>): Promise<SampleState> {
   var measureValues = new MeasureValues(state.completeSample.length, this._now(), metricValues);
   var completeSample = ListWrapper.concat(state.completeSample, [measureValues]);
   var validSample = this._validator.validate(completeSample);
   var resultPromise = this._reporter.reportMeasureValues(measureValues);
   if (isPresent(validSample)) {
     resultPromise =
         resultPromise.then((_) => this._reporter.reportSample(completeSample, validSample))
   }
   return resultPromise.then((_) => new SampleState(completeSample, validSample));
 }
开发者ID:AsherBarak,项目名称:angular,代码行数:11,代码来源:sampler.ts

示例10: addAst

 addAst(ast, bindingMemento, directiveMemento = null, variableBindings = null) {
   var last = ListWrapper.last(this.records);
   if (isPresent(last) && last.directiveMemento == directiveMemento) {
     last.lastInDirective = false;
   }
   var pr = _ConvertAstIntoProtoRecords.convert(ast, bindingMemento, directiveMemento, this.records.length, variableBindings);
   if (!ListWrapper.isEmpty(pr)) {
     var last = ListWrapper.last(pr);
     last.lastInBinding = true;
     last.lastInDirective = true;
     this.records = ListWrapper.concat(this.records, pr);
   }
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:13,代码来源:proto_change_detector.ts


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