parent
cba885a1fb
commit
0dc15eb64a
|
@ -275,7 +275,7 @@ export const ContentChild: ContentChildDecorator = makePropDecorator(
|
|||
['selector', undefined], {
|
||||
first: true,
|
||||
isViewQuery: false,
|
||||
descendants: false,
|
||||
descendants: true,
|
||||
read: undefined,
|
||||
}
|
||||
],
|
||||
|
|
|
@ -250,6 +250,17 @@ export function main() {
|
|||
expect(comp.textDirChild.text).toEqual('ca');
|
||||
});
|
||||
|
||||
it('should contain the first descendant content child', () => {
|
||||
const template = '<needs-content-child-read>' +
|
||||
'<div dir><div #q text="ca"></div></div>' +
|
||||
'</needs-content-child-read>';
|
||||
const view = createTestCmpAndDetectChanges(MyComp0, template);
|
||||
|
||||
const comp: NeedsContentChildWithRead =
|
||||
view.debugElement.children[0].injector.get(NeedsContentChildWithRead);
|
||||
expect(comp.textDirChild.text).toEqual('ca');
|
||||
});
|
||||
|
||||
it('should contain the first view child', () => {
|
||||
const template = '<needs-view-child-read></needs-view-child-read>';
|
||||
const view = createTestCmpAndDetectChanges(MyComp0, template);
|
||||
|
|
|
@ -20,10 +20,10 @@ export declare class ComponentFixture<T> {
|
|||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare var ComponentFixtureAutoDetect: OpaqueToken;
|
||||
export declare const ComponentFixtureAutoDetect: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
export declare var ComponentFixtureNoNgZone: OpaqueToken;
|
||||
export declare const ComponentFixtureNoNgZone: OpaqueToken;
|
||||
|
||||
/** @experimental */
|
||||
export declare function discardPeriodicTasks(): void;
|
||||
|
|
Loading…
Reference in New Issue