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


TypeScript MapWrapper.size方法代码示例

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


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

示例1: _createProtoElementInjector

function _createProtoElementInjector(binderIndex, parentPeiWithDistance, renderElementBinder,
                                     componentDirectiveBinding, directiveBindings) {
  var protoElementInjector = null;
  // Create a protoElementInjector for any element that either has bindings *or* has one
  // or more var- defined. Elements with a var- defined need a their own element injector
  // so that, when hydrating, $implicit can be set to the element.
  var hasVariables = MapWrapper.size(renderElementBinder.variableBindings) > 0;
  if (directiveBindings.length > 0 || hasVariables) {
    protoElementInjector = ProtoElementInjector.create(
        parentPeiWithDistance.protoElementInjector, binderIndex, directiveBindings,
        isPresent(componentDirectiveBinding), parentPeiWithDistance.distance);
    protoElementInjector.attributes = renderElementBinder.readAttributes;
    if (hasVariables) {
      protoElementInjector.exportComponent = isPresent(componentDirectiveBinding);
      protoElementInjector.exportElement = isBlank(componentDirectiveBinding);

      // experiment
      var exportImplicitName = MapWrapper.get(renderElementBinder.variableBindings, '\$implicit');
      if (isPresent(exportImplicitName)) {
        protoElementInjector.exportImplicitName = exportImplicitName;
      }
    }
  }
  return protoElementInjector;
}
开发者ID:188799958,项目名称:angular,代码行数:25,代码来源:proto_view_factory.ts

示例2: _createProtoElementInjector

 _createProtoElementInjector(binderIndex, parentPeiWithDistance, sortedDirectives, renderElementBinder) {
   var protoElementInjector = null;
   var hasVariables = MapWrapper.size(renderElementBinder.variableBindings) > 0;
   if (sortedDirectives.directives.length > 0 || hasVariables) {
     protoElementInjector = new ProtoElementInjector(parentPeiWithDistance.protoElementInjector, binderIndex, sortedDirectives.directives, isPresent(sortedDirectives.componentDirective), parentPeiWithDistance.distance);
     protoElementInjector.attributes = renderElementBinder.readAttributes;
     if (hasVariables && !isPresent(sortedDirectives.viewportDirective)) {
       protoElementInjector.exportComponent = isPresent(sortedDirectives.componentDirective);
       protoElementInjector.exportElement = isBlank(sortedDirectives.componentDirective);
       var exportImplicitName = MapWrapper.get(renderElementBinder.variableBindings, '\$implicit');
       if (isPresent(exportImplicitName)) {
         protoElementInjector.exportImplicitName = exportImplicitName;
       }
     }
   }
   return protoElementInjector;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:17,代码来源:proto_view_factory.ts

示例3: numberOfKeys

 get numberOfKeys() /* :int */ { return MapWrapper.size(this._allKeys); }
开发者ID:Jorvaulx,项目名称:angular,代码行数:1,代码来源:key.ts

示例4: isEmpty

 get isEmpty() {
   return MapWrapper.size(this.map) === 0;
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:3,代码来源:iterable_changes.ts


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