While reading the documentation of the bindonce directive, I wonder what is the difference between bo-html
and bo-text
.
bo-html
:
evaluates "markup" and render it as html inside the element
bo-text
:
evaluates "text" and print it as text inside the element
So, I expected this code to work:
<span bo-html="<strong>SomeText</strong>"></span>
But I got this:
Error: [$parse:syntax] Syntax Error: Token '<' not a primary expression at column 1 of the expression
<strong>
being a basic markup, isn't it?
If this can't work (maybe a syntax issue..), what is the real difference between bo-text
and bo-html
?
If you want to throw a string into bo-html, you need to declare it as a string because it's looking for a variable.
another way:
The difference is just as you copied above. You can see the difference by example: