本文整理汇总了TypeScript中angular2/src/core/compiler/view_ref.internalView函数的典型用法代码示例。如果您正苦于以下问题:TypeScript internalView函数的具体用法?TypeScript internalView怎么用?TypeScript internalView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了internalView函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should create the view', () => {
expect(internalView(manager.createViewInContainer(elementRef(wrapView(parentView), 0), 0,
wrapPv(childProtoView), null)))
.toBe(createdViews[0]);
expect(createdViews[0].proto).toBe(childProtoView);
expect(viewListener.spy('viewCreated')).toHaveBeenCalledWith(createdViews[0]);
});
开发者ID:SnackyPete,项目名称:angular,代码行数:7,代码来源:view_manager_spec.ts
示例2: beforeEach
beforeEach(() => {
parentHostView = createView(createProtoView([createComponentElBinder(null)]));
parentView = createView();
utils.attachComponentView(parentHostView, 0, parentView);
hostProtoView = createProtoView([createComponentElBinder(null)]);
hostView = internalView(manager.createFreeHostView(
elementRef(wrapView(parentHostView), 0), wrapPv(hostProtoView), null));
hostRenderViewRef = hostView.render;
});
开发者ID:SnackyPete,项目名称:angular,代码行数:9,代码来源:view_manager_spec.ts
示例3: internalView
var tick = (componentRef) => {
var appChangeDetector = internalView(componentRef.hostView).changeDetector;
// retrieve life cycle: may have already been created if injected in root component
var lc = appInjector.get(LifeCycle);
lc.registerWith(zone, appChangeDetector);
lc.tick(); // the first tick that will bootstrap the app
bootstrapProcess.resolve(new ApplicationRef(componentRef, appComponentType, appInjector));
};
开发者ID:cedriclam,项目名称:angular,代码行数:9,代码来源:application.ts
示例4: it
it('should get the view from the pool', () => {
var createdView;
viewPool.spy('getView').andCallFake((protoView) => {
createdView = createView(protoView);
return createdView;
});
expect(internalView(manager.createDynamicComponentView(
elementRef(wrapView(hostView), 0), wrapPv(componentProtoView), null, null)))
.toBe(createdView);
expect(utils.spy('createView')).not.toHaveBeenCalled();
expect(renderer.spy('createView')).not.toHaveBeenCalled();
});
开发者ID:188799958,项目名称:angular,代码行数:12,代码来源:view_manager_spec.ts
示例5: create
static create(elementRef: ElementRef): DebugElement {
return new DebugElement(internalView(elementRef.parentView), elementRef.boundElementIndex);
}
开发者ID:B-Thapa,项目名称:angular,代码行数:3,代码来源:debug_element.ts
示例6: constructor
constructor(componentRef: ComponentRef) {
this._componentRef = componentRef;
this._view = internalView(componentRef.hostView).componentChildViews[0];
}
开发者ID:Bogatinov,项目名称:angular,代码行数:4,代码来源:test_bed.ts
注:本文中的angular2/src/core/compiler/view_ref.internalView函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论