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


TypeScript index.viewDef函数代码示例

本文整理汇总了TypeScript中@angular/core/src/view/index.viewDef函数的典型用法代码示例。如果您正苦于以下问题:TypeScript viewDef函数的具体用法?TypeScript viewDef怎么用?TypeScript viewDef使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: it

      it('should calculate childFlags for two levels', () => {
        const vd = viewDef(ViewFlags.None, [
          elementDef(NodeFlags.None, null !, null !, 2, 'span'),
          elementDef(NodeFlags.None, null !, null !, 1, 'span'),
          directiveDef(NodeFlags.AfterContentChecked, null !, 0, AService, [])
        ]);

        expect(childFlags(vd)).toEqual([
          NodeFlags.TypeElement | NodeFlags.TypeDirective | NodeFlags.AfterContentChecked,
          NodeFlags.TypeDirective | NodeFlags.AfterContentChecked, NodeFlags.None
        ]);

        expect(directChildFlags(vd)).toEqual([
          NodeFlags.TypeElement, NodeFlags.TypeDirective | NodeFlags.AfterContentChecked,
          NodeFlags.None
        ]);
      });
开发者ID:DanielKucal,项目名称:angular,代码行数:17,代码来源:view_def_spec.ts

示例2: it

      it('should calculate childFlags for one level, multiple roots', () => {
        const vd = viewDef(ViewFlags.None, [
          elementDef(NodeFlags.None, null, null, 1, 'span'),
          directiveDef(NodeFlags.AfterContentChecked, null, 0, AService, []),
          elementDef(NodeFlags.None, null, null, 2, 'span'),
          directiveDef(NodeFlags.AfterContentInit, null, 0, AService, []),
          directiveDef(NodeFlags.AfterViewChecked, null, 0, AService, []),
        ]);

        expect(childFlags(vd)).toEqual([
          NodeFlags.TypeDirective | NodeFlags.AfterContentChecked, NodeFlags.None,
          NodeFlags.TypeDirective | NodeFlags.AfterContentInit | NodeFlags.AfterViewChecked,
          NodeFlags.None, NodeFlags.None
        ]);

        expect(directChildFlags(vd)).toEqual([
          NodeFlags.TypeDirective | NodeFlags.AfterContentChecked, NodeFlags.None,
          NodeFlags.TypeDirective | NodeFlags.AfterContentInit | NodeFlags.AfterViewChecked,
          NodeFlags.None, NodeFlags.None
        ]);
      });
开发者ID:JohnnyQQQQ,项目名称:angular,代码行数:21,代码来源:view_def_spec.ts

示例3: return

 return () => viewDef(ViewFlags.None, nodes, update);
开发者ID:ballipongala,项目名称:angular,代码行数:1,代码来源:query_spec.ts

示例4: compViewDef

 function compViewDef(
     nodes: NodeDef[], updateDirectives?: ViewUpdateFn, updateRenderer?: ViewUpdateFn,
     viewFlags: ViewFlags = ViewFlags.None): ViewDefinition {
   return viewDef(viewFlags, nodes, updateDirectives, updateRenderer);
 }
开发者ID:ballipongala,项目名称:angular,代码行数:5,代码来源:query_spec.ts

示例5: viewDef

 () => viewDef(
     ViewFlags.None,
     [
       elementDef(NodeFlags.None, [[1, QueryValueType.Provider]], null, 0, 'span'),
     ]))
开发者ID:JohnnyQQQQ,项目名称:angular,代码行数:5,代码来源:view_def_spec.ts

示例6: compViewDef

 function compViewDef(nodes: NodeDef[], updater?: ViewUpdateFn): ViewDefinition {
   return viewDef(config.viewFlags, nodes, updater, renderComponentType);
 }
开发者ID:JSMike,项目名称:angular,代码行数:3,代码来源:text_spec.ts

示例7: compViewDef

 function compViewDef(
     nodes: NodeDef[], update?: ViewUpdateFn, handleEvent?: ViewHandleEventFn): ViewDefinition {
   return viewDef(ViewFlags.None, nodes, update, handleEvent, renderComponentType);
 }
开发者ID:not-for-me,项目名称:angular,代码行数:4,代码来源:refs_spec.ts

示例8: embeddedViewDef

 function embeddedViewDef(nodes: NodeDef[], update?: ViewUpdateFn): ViewDefinition {
   return viewDef(config.viewFlags, nodes, update);
 }
开发者ID:doxiaodong,项目名称:angular,代码行数:3,代码来源:embedded_view_spec.ts

示例9: compViewDef

 function compViewDef(
     nodes: NodeDef[], updateDirectives?: ViewUpdateFn, updateRenderer?: ViewUpdateFn,
     handleEvent?: ViewHandleEventFn): ViewDefinition {
   return viewDef(ViewFlags.None, nodes, updateDirectives, updateRenderer, handleEvent);
 }
开发者ID:manekinekko,项目名称:angular,代码行数:5,代码来源:anchor_spec.ts

示例10: compViewDef

 function compViewDef(
     nodes: NodeDef[], update?: ViewUpdateFn, handleEvent?: ViewHandleEventFn,
     flags?: ViewFlags): ViewDefinition {
   return viewDef(config.viewFlags | flags, nodes, update, handleEvent, renderComponentType);
 }
开发者ID:doxiaodong,项目名称:angular,代码行数:5,代码来源:component_view_spec.ts


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