Skip to content

MathML is unsupported #55608

@lukewarlow

Description

@lukewarlow

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

When trying to use MathML in an angular template you get a warning that <math> it's an unrecognised element. If you disable this warning by adding schemas: [NO_ERRORS_SCHEMA] it doesn't render correctly. At first glance they seem correct because the produced elements are in the MathML namespace (something other frameworks can get wrong) but the element's prototype is just Element rather than MathMLElement.

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/github-tdmxzz?file=src%2Fmain.ts

Please provide the exception or error you saw

Error in src/main.ts (12:3)
':math:math' is not a known element:
1. If ':math:math' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.


### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

The template I tried is below. 

```html
<math>
  <mfrac>
    <mn>1</mn>
    <msqrt>
      <mn>2</mn>
    </msqrt>
  </mfrac>
</math>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions