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


TypeScript DirectDomRenderer.createRootProtoView方法代码示例

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


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

示例1: constructor

 constructor({urlData,
   viewCacheCapacity,
   shadowDomStrategy,
   templates}) {
   this._templates = MapWrapper.create();
   if (isPresent(templates)) {
     ListWrapper.forEach(templates, (template) => {
       MapWrapper.set(this._templates, template.componentId, template);
     });
   }
   this._compileCache = MapWrapper.create();
   var parser = new Parser(new Lexer());
   var urlResolver = new UrlResolver();
   if (isBlank(shadowDomStrategy)) {
     shadowDomStrategy = new EmulatedUnscopedShadowDomStrategy(new StyleUrlResolver(urlResolver), null);
   }
   var compiler = new Compiler(new DefaultStepFactory(parser, shadowDomStrategy), new FakeTemplateLoader(urlResolver, urlData));
   if (isBlank(viewCacheCapacity)) {
     viewCacheCapacity = 1;
   }
   if (isBlank(urlData)) {
     urlData = MapWrapper.create();
   }
   this.eventPlugin = new FakeEventManagerPlugin();
   var eventManager = new EventManager([this.eventPlugin], new FakeVmTurnZone());
   var viewFactory = new ViewFactory(viewCacheCapacity, eventManager, shadowDomStrategy);
   this.renderer = new DirectDomRenderer(compiler, viewFactory, shadowDomStrategy);
   this.rootEl = el('<div></div>');
   this.rootProtoViewRef = this.renderer.createRootProtoView(this.rootEl);
 }
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:30,代码来源:integration_testbed.ts


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