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


TypeScript ListWrapper.forEach方法代码示例

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


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

示例1:

 MapWrapper.forEach(this.paramsMap, (values, k) => {
   ListWrapper.forEach(values, v => { paramsList.push(k + '=' + v); });
 });
开发者ID:AsherBarak,项目名称:angular,代码行数:3,代码来源:url_search_params.ts

示例2: _createRecords

 _createRecords(definition: ChangeDetectorDefinition) {
   var recordBuilder = new ProtoRecordBuilder();
   ListWrapper.forEach(definition.bindingRecords,
                       (b) => { recordBuilder.add(b, definition.variableNames); });
   return coalesce(recordBuilder.records);
 }
开发者ID:NickWang1980,项目名称:angular,代码行数:6,代码来源:proto_change_detector.ts

示例3: insertAllBefore

 insertAllBefore(el, nodes) {
   ListWrapper.forEach(nodes, (n) => { this.insertBefore(el, n); });
 }
开发者ID:AsherBarak,项目名称:angular,代码行数:3,代码来源:parse5_adapter.ts

示例4: notify

 /** Notify other nadio buttons that selection for the given name has been set. */
 notify(name: string) {
   ListWrapper.forEach(this.listeners_, (f) => f(name));
 }
开发者ID:188799958,项目名称:angular,代码行数:4,代码来源:radio_dispatcher.ts

示例5: _setParentForControls

 _setParentForControls() {
   ListWrapper.forEach(this.controls, (control) => {
     control.setParent(this);
   });
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:5,代码来源:model.ts

示例6: createSteps

 createSteps(viewDef, subTaskPromises) {
   this.viewDef = viewDef;
   this.subTaskPromises = subTaskPromises;
   ListWrapper.forEach(this.subTaskPromises, (p) => ListWrapper.push(subTaskPromises, p));
   return this.steps;
 }
开发者ID:moltenglacier,项目名称:angular,代码行数:6,代码来源:compiler_common_tests.ts

示例7: resultIdLog

function resultIdLog(result) {
  var idLog = [];
  ListWrapper.forEach(result, (current) => { logEntry(idLog, null, current); });
  return idLog;
}
开发者ID:Salim-K,项目名称:angular,代码行数:5,代码来源:pipeline_spec.ts

示例8: _createView

 _createView(protoView) {
   var rootElementClone = protoView.isRootView ? protoView.element : DOM.importIntoDoc(protoView.element);
   var elementsWithBindingsDynamic;
   if (protoView.isTemplateElement) {
     elementsWithBindingsDynamic = DOM.querySelectorAll(DOM.content(rootElementClone), NG_BINDING_CLASS_SELECTOR);
   } else {
     elementsWithBindingsDynamic = DOM.getElementsByClassName(rootElementClone, NG_BINDING_CLASS);
   }
   var elementsWithBindings = ListWrapper.createFixedSize(elementsWithBindingsDynamic.length);
   for (var binderIdx = 0; binderIdx < elementsWithBindingsDynamic.length; ++binderIdx) {
     elementsWithBindings[binderIdx] = elementsWithBindingsDynamic[binderIdx];
   }
   var viewRootNodes;
   if (protoView.isTemplateElement) {
     var childNode = DOM.firstChild(DOM.content(rootElementClone));
     viewRootNodes = [];
     while (childNode != null) {
       ListWrapper.push(viewRootNodes, childNode);
       childNode = DOM.nextSibling(childNode);
     }
   } else {
     viewRootNodes = [rootElementClone];
   }
   var binders = protoView.elementBinders;
   var boundTextNodes = [];
   var boundElements = ListWrapper.createFixedSize(binders.length);
   var viewContainers = ListWrapper.createFixedSize(binders.length);
   var contentTags = ListWrapper.createFixedSize(binders.length);
   for (var binderIdx = 0; binderIdx < binders.length; binderIdx++) {
     var binder = binders[binderIdx];
     var element;
     if (binderIdx === 0 && protoView.rootBindingOffset === 1) {
       element = rootElementClone;
     } else {
       element = elementsWithBindings[binderIdx - protoView.rootBindingOffset];
     }
     boundElements[binderIdx] = element;
     var childNodes = DOM.childNodes(DOM.templateAwareRoot(element));
     var textNodeIndices = binder.textNodeIndices;
     for (var i = 0; i < textNodeIndices.length; i++) {
       ListWrapper.push(boundTextNodes, childNodes[textNodeIndices[i]]);
     }
     var viewContainer = null;
     if (isBlank(binder.componentId) && isPresent(binder.nestedProtoView)) {
       viewContainer = new ViewContainer(this, element);
     }
     viewContainers[binderIdx] = viewContainer;
     var contentTag = null;
     if (isPresent(binder.contentTagSelector)) {
       contentTag = new Content(element, binder.contentTagSelector);
     }
     contentTags[binderIdx] = contentTag;
   }
   var view = new View(protoView, viewRootNodes, boundTextNodes, boundElements, viewContainers, contentTags);
   for (var binderIdx = 0; binderIdx < binders.length; binderIdx++) {
     var binder = binders[binderIdx];
     var element = boundElements[binderIdx];
     if (isPresent(binder.componentId) && isPresent(binder.nestedProtoView)) {
       var childView = this._createView(binder.nestedProtoView);
       view.setComponentView(this._shadowDomStrategy, binderIdx, childView);
     }
     if (isPresent(binder.eventLocals)) {
       ListWrapper.forEach(binder.eventNames, (eventName) => {
         this._createEventListener(view, element, binderIdx, eventName, binder.eventLocals);
       });
     }
   }
   if (protoView.isRootView) {
     view.hydrate(null);
   }
   return view;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:72,代码来源:view_factory.ts


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