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


TypeScript ListWrapper.create方法代码示例

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


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

示例1: _emptyAllActiveViewContainers

 _emptyAllActiveViewContainers() {
   var activeContainers = this._activeViewContainers;
   for (var i = 0; i < activeContainers.length; i++) {
     activeContainers[i].remove();
   }
   this._activeViewContainers = ListWrapper.create();
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:7,代码来源:switch.ts

示例2: recognize

  /**
   * Given a URL, returns a list of `RouteMatch`es, which are partial recognitions for some route.
   *
   */
  recognize(url: string): List<RouteMatch> {
    var solutions = ListWrapper.create();

    MapWrapper.forEach(this.redirects, (target, path) => {
      // TODO: "/" redirect case
      if (StringWrapper.startsWith(url, path)) {
        url = target + StringWrapper.substring(url, path.length);
      }
    });

    MapWrapper.forEach(this.matchers, (pathRecognizer, regex) => {
      var match;
      if (isPresent(match = RegExpWrapper.firstMatch(regex, url))) {
        // TODO(btford): determine a good generic way to deal with terminal matches
        var matchedUrl = '/';
        var unmatchedUrl = '';
        if (url != '/') {
          matchedUrl = match[0];
          unmatchedUrl = StringWrapper.substring(url, match[0].length);
        }
        ListWrapper.push(solutions, new RouteMatch({
                           specificity: pathRecognizer.specificity,
                           handler: pathRecognizer.handler,
                           params: pathRecognizer.parseParams(url),
                           matchedUrl: matchedUrl,
                           unmatchedUrl: unmatchedUrl
                         }));
      }
    });

    return solutions;
  }
开发者ID:B-Thapa,项目名称:angular,代码行数:36,代码来源:route_recognizer.ts

示例3: toString

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

示例4: constructor

 constructor() {
   super();
   this._path = '/';
   this.urlChanges = ListWrapper.create();
   this._subject = new EventEmitter();
   this._baseHref = '';
 }
开发者ID:B-Thapa,项目名称:angular,代码行数:7,代码来源:location_mock.ts

示例5:

 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

示例6: light

 static light(debugElement): List<DebugElement> {
   var scope = ListWrapper.create();
   ListWrapper.forEach(debugElement.children, (child) => {
     ListWrapper.push(scope, child);
     scope = ListWrapper.concat(scope, Scope.light(child));
   });
   return scope;
 }
开发者ID:B-Thapa,项目名称:angular,代码行数:8,代码来源:debug_element.ts

示例7: _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

示例8: _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

示例9: process

 process(rootElement, compilationCtxtDescription = '') {
   var results = ListWrapper.create();
   var rootCompileElement = new CompileElement(rootElement, compilationCtxtDescription);
   rootCompileElement.inheritedProtoView = new ProtoViewBuilder(rootElement);
   rootCompileElement.isViewRoot = true;
   this._process(results, null, rootCompileElement, compilationCtxtDescription);
   return results;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:8,代码来源:compile_pipeline.ts

示例10: view

  static view(testElement): List<TestElement> {
    var scope = ListWrapper.create();

    ListWrapper.forEach(testElement.componentViewChildren, (child) => {
      ListWrapper.push(scope, child);
      scope = ListWrapper.concat(scope, Scope.light(child));
    });
    return scope;
  }
开发者ID:188799958,项目名称:angular,代码行数:9,代码来源:test_component_builder.ts


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