Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

binding with no {{}} does not work #534

Closed
mhevery opened this issue Aug 24, 2011 · 4 comments · Fixed by #539
Closed

binding with no {{}} does not work #534

mhevery opened this issue Aug 24, 2011 · 4 comments · Fixed by #539

Comments

@mhevery
Copy link
Contributor

mhevery commented Aug 24, 2011

Consider the example at http://jsfiddle.net/QW5wm/

Both a-tags should link to the same URL. However, "Link B" disregards
the ng:href template.

@ghost ghost assigned Codier Aug 25, 2011
@Codier
Copy link
Contributor

Codier commented Aug 25, 2011

Why do you want to use ng:href if there is no binding?

@mhevery
Copy link
Contributor Author

mhevery commented Aug 25, 2011

The issue is that the second link does not work

<a ng:href="#/link{{'1'}}">link A</a><br/>
<a ng:href="#/link1">link B</a>

@Codier
Copy link
Contributor

Codier commented Aug 25, 2011

I know. A related issue is that ng:check=true will not work as well.
Basically, I suspect any directive in the following list will work in the case when you don't have double curly in the expression.

forEach('src,href,checked,disabled,multiple,readonly,selected'.split(','), function(name) {
SPECIAL_ATTRS['ng:' + name] = name;
});

The code snippet above is from markups.js
https://github.com/angular/angular.js/blob/master/src/markups.js

But again. Why do you want to do ng:href="#/link" when you can simply do href="#/link"

@mhevery
Copy link
Contributor Author

mhevery commented Aug 25, 2011

regardless wether you would want to do this, the expected behavior is that ng:href works like href, and in this case it does not. :-(

@Codier Codier closed this as completed in 5927b23 Aug 26, 2011
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants