From 6c3c6060a58761734abb7304b044fb87f8deeb20 Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Fri, 28 Aug 2015 14:55:12 -0700 Subject: [PATCH] fix(core): Fix type error Ensure that values passed to `DomRenderer#setElementAttribute` are strings. Currently, booleans can be passed to this method, resulting in failures when running in Dart checked mode. --- modules/angular2/src/core/compiler/view.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/angular2/src/core/compiler/view.ts b/modules/angular2/src/core/compiler/view.ts index 87781f3b96..048874e7cc 100644 --- a/modules/angular2/src/core/compiler/view.ts +++ b/modules/angular2/src/core/compiler/view.ts @@ -184,7 +184,7 @@ export class AppView implements ChangeDispatcher, RenderEventDispatcher { if (b.isElementProperty()) { this.renderer.setElementProperty(elementRef, b.name, currentValue); } else if (b.isElementAttribute()) { - this.renderer.setElementAttribute(elementRef, b.name, currentValue); + this.renderer.setElementAttribute(elementRef, b.name, `${currentValue}`); } else if (b.isElementClass()) { this.renderer.setElementClass(elementRef, b.name, currentValue); } else if (b.isElementStyle()) {