| OLD | NEW |
| (Empty) | |
| 1 library ng_bind_html_spec; |
| 2 |
| 3 import '../_specs.dart'; |
| 4 |
| 5 main() { |
| 6 describe('BindHtmlDirective', () { |
| 7 TestBed _; |
| 8 |
| 9 beforeEach(inject((TestBed tb) => _ = tb)); |
| 10 |
| 11 it('should sanitize and set innerHtml and sanitize and set html', |
| 12 inject((Scope scope, Injector injector, Compiler compiler) { |
| 13 var element = $('<div ng-bind-html="htmlVar"></div>'); |
| 14 compiler(element)(injector, element); |
| 15 scope.htmlVar = '<a href="http://www.google.com"><b>Google!</b></a>'; |
| 16 scope.$digest(); |
| 17 // Sanitization removes the href attribute on the <a> tag. |
| 18 expect(element.html()).toEqual('<a><b>Google!</b></a>'); |
| 19 })); |
| 20 }); |
| 21 } |
| OLD | NEW |