fix(select): add the cssClass passed by the user to the alert for a select

fixes #6835
This commit is contained in:
Brandy Carney
2016-07-08 13:44:05 -04:00
parent 88b637b491
commit 81ddd7f0a9
3 changed files with 12 additions and 5 deletions

View File

@ -103,7 +103,8 @@ export class AlertCmp {
if (this.d.cssClass) {
this.d.cssClass.split(' ').forEach(cssClass => {
renderer.setElementClass(_elementRef.nativeElement, cssClass, true);
// Make sure the class isn't whitespace, otherwise it throws exceptions
if (cssClass.trim() !== '') renderer.setElementClass(_elementRef.nativeElement, cssClass, true);
});
}