mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-08 17:10:06 +08:00
fix(ng-href): copy even if no binding
Closes# 850 fixed an issue where ng-href would not copy its content into href if it did not contain binding.
This commit is contained in:
@@ -10,7 +10,14 @@ describe('boolean attr directives', function() {
|
||||
|
||||
it('should bind href', inject(function($rootScope, $compile) {
|
||||
element = $compile('<a ng-href="{{url}}"></a>')($rootScope)
|
||||
$rootScope.url = 'http://server'
|
||||
$rootScope.url = 'http://server';
|
||||
$rootScope.$digest();
|
||||
expect(element.attr('href')).toEqual('http://server');
|
||||
}));
|
||||
|
||||
|
||||
it('should bind href even if no interpolation', inject(function($rootScope, $compile) {
|
||||
element = $compile('<a ng-href="http://server"></a>')($rootScope)
|
||||
$rootScope.$digest();
|
||||
expect(element.attr('href')).toEqual('http://server');
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user