We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 723296e commit 359bdcfCopy full SHA for 359bdcf
angular/src/directives/control-value-accessors/value-accessor.ts
@@ -54,10 +54,15 @@ function setIonicClasses(element: ElementRef) {
54
'ion-pristine'
55
);
56
57
- classList.forEach((cls: string) => {
58
- if (cls.startsWith('ng-')) {
59
- classList.add(`ion-${cls.substr(3)}`);
+ for (let i = 0; i < classList.length; i++) {
+ const item = classList.item(i);
+ if (item && startsWith(item, 'ng-')) {
60
+ classList.add(`ion-${item.substr(3)}`);
61
}
- });
62
+ }
63
});
64
65
+
66
+function startsWith(input: string, search: string): boolean {
67
+ return input.substr(0, search.length) === search;
68
+}
0 commit comments