Search code examples
htmlaurelia

How to ignore html in aurelia


I'm trying to write a simple site which lists some code and some html and provides a bit of styling and an explanation. How do I add HTML on the server to my document without aurelia trying to parse this? I do not use a view-model, just plain HTML.

For example, I'm using Prism to highlight the following code:

<span>${firstName}</span>

but, this code ends up as:

<span></span>

in my document. Is there a way for me to tell aurelia to skip certain parts of the html? To make the question harder, I include these pieces of code from an actual source files (using swig includes) so I can't manually add attributes; I want to keep the html "as is". I can however wrap it in a custom element but I would prefer not to.

What I've tried (will list more options as I try them):

  • Wrapping the html in a script tag. Hoped auralia would leave that alone, but no dice.
  • Escaping the HTML

Any help would be much appreciated.


Solution

  • No, it is not possible to do this. (16-05-2016)

    The other two answers are work-arounds and should be used.