Rendering Code in Angular 2 Template

I'm currently working on an Angular 2 application and should display some C # code in an Angular 2 template, which will be created later using a syntax shortcut.

However, as soon as I drop the code into an Angular 2 template, I get parsing errors when it tries to parse C # and does not work.

zone.js:355 Unhandled Promise rejection: Template parse errors: <code>...

What is the solution to this? Does Angular 2 include the ability to ignore parts of my template code?

+5
source share
1 answer
 <code ngNonBindable> code here </code> 
+5
source

Source: https://habr.com/ru/post/1015477/


All Articles