question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tag like <center>, <big> causes template parsing error

See original GitHub issue

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 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
pkozlowski-opensourcecommented, Sep 2, 2016

Both <center> and <big> are deprecated and come with a big red warning, check:

This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

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.

3reactions
DzmitryShylovichcommented, Feb 9, 2017

@richardsengers wrong schema 😃 You need NO_ERRORS_SCHEMA https://plnkr.co/edit/4SAVXRjvYOLE270KbkHk?p=preview

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found