Skip to content

enableLegacyTemplate option ignored #15555

Closed

Description

@hotforfeature

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:

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

  1. added
    area: core
    on Mar 29, 2017
  2. hotforfeature commented on May 9, 2017

    @hotforfeature
    ContributorAuthor

    @DzmitryShylovich I see you were working on this, any chance a PR is coming?

  3. added a commit that references this issue on May 26, 2017
    730bd0d
  4. added a commit that references this issue on May 30, 2017
    8ffa483
  5. added a commit that references this issue on Aug 11, 2017
    09737c3
  6. added a commit that references this issue on Aug 28, 2017
    3f34ee4
  7. angular-automatic-lock-bot commented on Sep 12, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coretype: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions