WhoDidThis
WhoDidThis

Reputation: 383

AngularJS: Clearing an ng-href link

Stumbled upon this link on ng-href and am wondering about the same thing.

Is there a way to clear the href of an ng-href link? Null values do not work post 1.0.3.

Upvotes: 1

Views: 1224

Answers (2)

okm
okm

Reputation: 23871

According to the commit, the preventing of empty value mainly targets to <img src> <link href> <script src>, but also incidentally prevents href of <a> from being empty which is valid value. I've written a ticket for this.

Upvotes: 1

Roy Daniels
Roy Daniels

Reputation: 6309

Yeah just have set whatever your return value is for ng-href to " " (<- there is one space between the quotes). It should work as expected then.

Upvotes: 1

Related Questions