Repository navigation
Description
I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Bootstrapping an app with enableLegacyTemplate set to false will create a compiler with enableLegacyTemplate set to true. This occurs when merging compiler options array:
angular/packages/compiler/src/jit/compiler_factory.ts
Lines 148 to 153 in bebedfe
| return { | |
| useJit: _lastDefined(optionsArr.map(options => options.useJit)), | |
| defaultEncapsulation: _lastDefined(optionsArr.map(options => options.defaultEncapsulation)), | |
| providers: _mergeArrays(optionsArr.map(options => options.providers)), | |
| missingTranslation: _lastDefined(optionsArr.map(options => options.missingTranslation)), | |
| }; |
platformBrowserDynamic().bootstrapModule(AppModule, [
{
enableLegacyTemplate: false
}
]);Expected behavior
Compiler should not warn about deprecated <template> and should not consume them as Angular templates when enableLegacyTemplate is false.
Or, if this is not the correct way to set enableLegacyTemplate, provide clearer documentation on how to set the option.
Minimal reproduction of the problem with instructions
http://plnkr.co/edit/3h8VvL6v4jh5HbsHkiwT?p=preview
What is the motivation / use case for changing the behavior?
In order to use Polymer with Angular, we must use <ng-template> and allow webcomponents to consume <template>s regularly.
Please tell us about your environment:
-
Angular version: 4.0.0
-
Browser: [all]
-
Language: [all]
-
Node (for AoT issues):
node --version= 6.9.5
Activity
hotforfeature commentedon May 9, 2017
@DzmitryShylovich I see you were working on this, any chance a PR is coming?
fix(compiler): enableLegacyTemplate should not be ignored
fix(compiler): enableLegacyTemplate should not be ignored (#17051)
fix(compiler): enableLegacyTemplate should not be ignored (angular#17051
fix(compiler): enableLegacyTemplate should not be ignored (angular#17051
angular-automatic-lock-bot commentedon Sep 12, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.