From 8e1276c011b33b90af47494dc5e76baf86468a5a Mon Sep 17 00:00:00 2001 From: Francesco Pontillo Date: Sat, 31 Aug 2013 11:48:11 +0200 Subject: fix($compile): allow interpolations for non-event handlers attrs Fix wrong behaviour that didn't allow 'data-on' and 'on' element attributes to be interpolated by $compile. The regex now accepts any string beginning with 'on' and with at least one more English letter. --- test/ng/compileSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 580d51c3..6b3a0479 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -3250,6 +3250,18 @@ describe('$compile', function() { $rootScope.$apply(); expect(element.attr('on-click')).toEqual('javascript:doSomething()'); })); + + it('should pass through arbitrary values on "on" and "data-on" attributes', inject(function($compile, $rootScope) { + element = $compile('