Tag like <center>, <big> causes template parsing error
See original GitHub issueI’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
DOM markup tag like <center>
, <big>
will cause error like this
Template parse errors:
'center' is not a known element:
1. If 'center' is an Angular component, then verify that it is part of this module.
2. If 'center' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("[ERROR ->]<center> My First Angular 2 App</center>"): AppComponent@0:0 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:(…) Error: Template parse errors:
'center' is not a known element:
1. If 'center' is an Angular component, then verify that it is part of this module.
2. If 'center' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("[ERROR ->]<center> My First Angular 2 App</center>"): AppComponent@0:0
Expected/desired behavior It should parse the template normal, but it acts like not recognizing HTML4 tags
Reproduction of the problem If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Please tell us about your environment:
- Angular version: 2.0.0-rc.6
- Browser: Chrome
- Language: TypeScript 2.0.0
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Common CSS Parser Errors (Parsing Errors Found)
An Unknown Word Error is similar to an unclosed block error and often shows when the selector is missing the left curly bracket....
Read more >Thymeleaf template parsing error with linebreak - Stack Overflow
However, when i try to add a <br/> it throws an error. What i am trying to do is add a linebreak after...
Read more >13.2 Parsing HTML documents - HTML Standard
This error occurs if the parser encounters an attribute in a tag that already has an attribute with the same name. The parser...
Read more >Resolve VAST and IMA SDK errors - Google Ad Manager Help
This can be caused by user, site, or player latency or crashes, users leaving the page before the player has a chance to...
Read more >Built-in template tags and filters - Django documentation
The include tag should be considered as an implementation of “render this subtemplate and include the HTML”, not as “parse this subtemplate and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Both
<center>
and<big>
are deprecated and come with a big red warning, check:As you can see it has very explicit warning saying “could be removed at any time” and “Pages or Web apps using it may break at any time”. As such I don’t think we want to encourage usage of those tags in Angular.
@richardsengers wrong schema 😃 You need
NO_ERRORS_SCHEMA
https://plnkr.co/edit/4SAVXRjvYOLE270KbkHk?p=preview