javascripthtmlangularnofollow

How to conditionally add the nofollow tag in Angular


I have a link and would like to add the rel=nofollow only on specific link.

It is possible to do that with Angular?


Solution

  • TLDR

    [rel]="i ? 'nofollow' : null

    Why

    Basically, When using the null value, the tag will just be ignored.