S
S
SEACRE5T2021-09-27 21:58:18
Angular
SEACRE5T, 2021-09-27 21:58:18

Why is the expression not being executed in href?

<a href="{{prog.linkToFeedbacks.split('#')[0]}}" target="_blank">text</a>


under prog.linkToFeedbacks line https://polis.ua/insurance-companies/inter-polis#f...

Why doesn't it work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2021-09-28
@SEACRE5T

Don't get carried away with such things. Calculate the href in the component ahead of time, put it in a property.
Not only is it not quite js in the template, it's all parsed by angular. It will be recalculated each time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question