refactor(ivy): make all directives public by default (#25291)

To match the View Engine behavior.

We should make this configurable so that the node injector is tree shaken when
directives do not need to be published.

PR Close #25291
This commit is contained in:
Victor Berchet
2018-08-03 12:20:27 -07:00
committed by Kara Erickson
parent 26a15cc534
commit 1e7ca22078
10 changed files with 119 additions and 35 deletions

View File

@ -123,7 +123,7 @@ describe('Renderer', () => {
.toBe(analyzedFile.analyzedClasses[0]);
expect(renderer.addDefinitions.calls.first().args[2])
.toEqual(
`A.ngDirectiveDef = ɵngcc0.ɵdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory() { return new A(); } });`);
`A.ngDirectiveDef = ɵngcc0.ɵdefineDirective({ type: A, selectors: [["", "a", ""]], factory: function A_Factory() { return new A(); }, features: [ɵngcc0.ɵPublicFeature] });`);
});
it('should call removeDecorators with the source code, a map of class decorators that have been analyzed',