angulardart / angular

Fast and productive web framework provided by Dart
https://pub.dev/packages/angular
MIT License
1.83k stars 232 forks source link

Rename `<template>` to `<ng-template>` #1050

Open zoechi opened 6 years ago

zoechi commented 6 years ago

Angular fully claiming the <template> tag prevents for example

    <dom-repeat items="{{employees}}">
      <template>
        <div>First name: <span>{{item.first}}</span></div>
        <div>Last name: <span>{{item.last}}</span></div>
      </template>
    </dom-repeat>

https://www.polymer-project.org/2.0/docs/api/elements/Polymer.DomRepeat

inside an Angular component

That was also done in TS

matanlurey commented 6 years ago

We talked a bit offline, but if we do this, it won't be until 5.1+.

A likely story would be adding support for <ng-template>, but making it optional, and potentially also adding a way to say "this is a native template tag", i.e. <template @native> (or better syntax).

... we could fix it in 6.0, but that might be for aw while.

matanlurey commented 5 years ago
<twitter-login>
  <template>I am a thing</template>
</twitter-login>

We could solve this with @supressXXX or rename to <ng-template>.