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


TypeScript ListWrapper.join方法代码示例

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


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

示例1: toString

 toString(): string {
   var paramsList = [];
   MapWrapper.forEach(this.paramsMap, (values, k) => {
     ListWrapper.forEach(values, v => { paramsList.push(k + '=' + v); });
   });
   return ListWrapper.join(paramsList, '&');
 }
开发者ID:Salim-K,项目名称:angular,代码行数:7,代码来源:url_search_params.ts

示例2: removeClass

 removeClass(element, classname: string) {
   var classList = this.classList(element);
   var index = classList.indexOf(classname);
   if (index > -1) {
     classList.splice(index, 1);
     element.attribs["class"] = element.className = ListWrapper.join(classList, " ");
   }
 }
开发者ID:CADBOT,项目名称:angular,代码行数:8,代码来源:parse5_adapter.ts

示例3: addClass

 addClass(element, classname: string) {
   var classList = this.classList(element);
   var index = classList.indexOf(classname);
   if (index == -1) {
     ListWrapper.push(classList, classname);
     element.attribs["class"] = element.className = ListWrapper.join(classList, " ");
   }
 }
开发者ID:CADBOT,项目名称:angular,代码行数:8,代码来源:parse5_adapter.ts

示例4: genPipeOnDestroy

 /**
  * Generates statements destroying all pipe variables.
  */
 genPipeOnDestroy(): string {
   return ListWrapper.join(
       ListWrapper.map(
           ListWrapper.filter(this.records, (r) => { return r.isPipeRecord(); }),
           (r) => {
             return `${this.utilName}.callPipeOnDestroy(${this.getPipeName(r.selfIndex)});`;
           }),
       '\n');
 }
开发者ID:synaptek,项目名称:angular,代码行数:12,代码来源:codegen_name_util.ts

示例5: genDehydrateFields

  /**
   * Generates statements which clear all fields so that the change detector is dehydrated.
   */
  genDehydrateFields(): string {
    var fields = this.getAllFieldNames();
    ListWrapper.removeAt(fields, CONTEXT_INDEX);
    if (ListWrapper.isEmpty(fields)) return '';

    // At least one assignment.
    fields.push(`${this.utilName}.uninitialized;`);
    return ListWrapper.join(fields, ' = ');
  }
开发者ID:synaptek,项目名称:angular,代码行数:12,代码来源:codegen_name_util.ts

示例6: verifyNoOustandingExpectations

 verifyNoOustandingExpectations() {
   if (this._expectations.length === 0)
     return ;
   var urls = [];
   for (var i = 0; i < this._expectations.length; i++) {
     var expectation = this._expectations[i];
     ListWrapper.push(urls, expectation.url);
   }
   throw new BaseException(`Unsatisfied requests: ${ListWrapper.join(urls, ', ')}`);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:10,代码来源:xhr_mock.ts

示例7: genInitLocals

 /**
  * Generate a statement initializing local variables used when detecting changes.
  */
 genInitLocals(): string {
   var declarations = [];
   var assignments = [];
   for (var i = 0, iLen = this.getFieldCount(); i < iLen; ++i) {
     if (i == CONTEXT_INDEX) {
       declarations.push(`${this.getLocalName(i)} = ${this.getFieldName(i)}`);
     } else {
       var rec = this.records[i - 1];
       if (rec.argumentToPureFunction) {
         var changeName = this.getChangeName(i);
         declarations.push(`${this.getLocalName(i)},${changeName}`);
         assignments.push(changeName);
       } else {
         declarations.push(`${this.getLocalName(i)}`);
       }
     }
   }
   var assignmentsCode =
       ListWrapper.isEmpty(assignments) ? '' : `${ListWrapper.join(assignments, '=')} = false;`;
   return `var ${ListWrapper.join(declarations, ',')};${assignmentsCode}`;
 }
开发者ID:synaptek,项目名称:angular,代码行数:24,代码来源:codegen_name_util.ts

示例8:

 var defaultErrorReporter = (exception, stackTrace) => {
   var longStackTrace = ListWrapper.join(stackTrace, "\n\n-----async gap-----\n");
   DOM.logError(`${exception}\n\n${longStackTrace}`);
   throw exception;
 };
开发者ID:cedriclam,项目名称:angular,代码行数:5,代码来源:application.ts

示例9: _mapPrimitiveName

function _mapPrimitiveName(keys: List<any>) {
  var stringifiedKeys =
      ListWrapper.join(ListWrapper.map(keys, (k) => isString(k) ? `"${k}"` : `${k}`), ", ");
  return `mapFn([${stringifiedKeys}])`;
}
开发者ID:jimthedev,项目名称:angular,代码行数:5,代码来源:proto_change_detector.ts

示例10: result

 result(): string { return ListWrapper.join(this._result, "; "); }
开发者ID:Bogatinov,项目名称:angular,代码行数:1,代码来源:utils.ts


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