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


TypeScript ListWrapper.last方法代码示例

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


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

示例1: add

 add(b: BindingRecord, variableNames: List<string> = null) {
   var oldLast = ListWrapper.last(this.records);
   if (isPresent(oldLast) && oldLast.bindingRecord.directiveRecord == b.directiveRecord) {
     oldLast.lastInDirective = false;
   }
   this._appendRecords(b, variableNames);
   var newLast = ListWrapper.last(this.records);
   if (isPresent(newLast) && newLast !== oldLast) {
     newLast.lastInBinding = true;
     newLast.lastInDirective = true;
   }
 }
开发者ID:jimthedev,项目名称:angular,代码行数:12,代码来源:proto_change_detector.ts

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

示例3: add

 add(b: BindingRecord, variableNames: List<string> = null) {
   var oldLast = ListWrapper.last(this.records);
   if (isPresent(oldLast) && oldLast.bindingRecord.directiveRecord == b.directiveRecord) {
     oldLast.lastInDirective = false;
   }
   var numberOfRecordsBefore = this.records.length;
   this._appendRecords(b, variableNames);
   var newLast = ListWrapper.last(this.records);
   if (isPresent(newLast) && newLast !== oldLast) {
     newLast.lastInBinding = true;
     newLast.lastInDirective = true;
     this._setArgumentToPureFunction(numberOfRecordsBefore);
   }
 }
开发者ID:lavinjj,项目名称:angular,代码行数:14,代码来源:proto_change_detector.ts

示例4: addAst

  addAst(b: BindingRecord, variableNames: List < string >= null) {
    var last = ListWrapper.last(this.records);
    if (isPresent(last) && last.bindingRecord.directiveRecord == b.directiveRecord) {
      last.lastInDirective = false;
    }

    var pr = _ConvertAstIntoProtoRecords.convert(b, this.records.length, variableNames);
    if (!ListWrapper.isEmpty(pr)) {
      var last = ListWrapper.last(pr);
      last.lastInBinding = true;
      last.lastInDirective = true;

      this.records = ListWrapper.concat(this.records, pr);
    }
  }
开发者ID:Dineshchse,项目名称:angular,代码行数:15,代码来源:proto_change_detector.ts

示例5: attachViewInContainer

 // Misnomer: this method is attaching next to the view container.
 attachViewInContainer(parentView: viewModule.AppView, boundElementIndex: number,
                       contextView: viewModule.AppView, contextBoundElementIndex: number,
                       atIndex: number, view: viewModule.AppView) {
   if (isBlank(contextView)) {
     contextView = parentView;
     contextBoundElementIndex = boundElementIndex;
   }
   parentView.changeDetector.addChild(view.changeDetector);
   var viewContainer = this._getOrCreateViewContainer(parentView, boundElementIndex);
   ListWrapper.insert(viewContainer.views, atIndex, view);
   var sibling;
   if (atIndex == 0) {
     sibling = null;
   } else {
     sibling = ListWrapper.last(viewContainer.views[atIndex - 1].rootElementInjectors)
   }
   var elementInjector = contextView.elementInjectors[contextBoundElementIndex];
   for (var i = view.rootElementInjectors.length - 1; i >= 0; i--) {
     if (isPresent(elementInjector.parent)) {
       view.rootElementInjectors[i].linkAfter(elementInjector.parent, sibling);
     } else {
       contextView.rootElementInjectors.push(view.rootElementInjectors[i]);
     }
   }
 }
开发者ID:jimthedev,项目名称:angular,代码行数:26,代码来源:view_manager_utils.ts

示例6: _findUrlSegment

function _findUrlSegment(segment: RouteSegment, routeTree: Tree<RouteSegment>): UrlSegment {
  let s = segment;
  let res = null;
  while (isBlank(res)) {
    res = ListWrapper.last(s.urlSegments);
    s = routeTree.parent(s);
  }
  return res;
}
开发者ID:JavaScript-Resource,项目名称:angular,代码行数:9,代码来源:link.ts

示例7: remove

 remove(key: string) {
   if (!key.contains('.')) {
     return MapWrapper.delete(this._data, key);
   }
   var pieces = key.split('.');
   var last = ListWrapper.last(pieces);
   pieces.length = pieces.length - 1;
   var target = _resolve(pieces, this);
   return target.remove(last);
 }
开发者ID:Salim-K,项目名称:angular,代码行数:10,代码来源:common.ts

示例8: _genEndOfSkipBlock

  /** @internal */
  _genEndOfSkipBlock(protoIndex: number): string {
    if (!ListWrapper.isEmpty(this._endOfBlockIdxs)) {
      let endOfBlock = ListWrapper.last(this._endOfBlockIdxs);
      if (protoIndex === endOfBlock) {
        this._endOfBlockIdxs.pop();
        return '}';
      }
    }

    return '';
  }
开发者ID:Konviser,项目名称:todo-list,代码行数:12,代码来源:change_detection_jit_generator.ts

示例9: set

 set(key: string, value) {
   if (key.indexOf('.') == -1) {
     this._data[key] = value;
     return;
   }
   var pieces = key.split('.');
   var last = ListWrapper.last(pieces);
   pieces.length = pieces.length - 1;
   var target = _resolve(pieces, this);
   target[last] = value;
 }
开发者ID:Salim-K,项目名称:angular,代码行数:11,代码来源:common.ts

示例10: get

 get(key: string) {
   if (key.indexOf('.') == -1) {
     return this._data[key];
   }
   var pieces = key.split('.');
   var last = ListWrapper.last(pieces);
   pieces.length = pieces.length - 1;
   var target = _resolve(pieces, this);
   if (target == null) {
     return null;
   }
   return target[last];
 }
开发者ID:Salim-K,项目名称:angular,代码行数:13,代码来源:common.ts


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