Guides
GuidesExamplesGitterLog In
Guides

Support IE 8

I am so sorry for you...

❗️

Support Being Dropped

Support for IE 8 will be dropped in the next major release. After that time, there will be no updates for versions of angular-formly supporting IE 8. (Note, you will always be able to use older versions with IE 8).

angular-formly supports all of the latest browsers and works with IE8 (thanks koenweyn)! To make formly functional in IE8, formly already adds the dashed version of all of its directives as custom tags.

Polyfills

You must also add polyfills for a number of ES5 functions: String.prototype.trim, Array.isArray, Array.prototype.map, Array.prototype.filter, Array.prototype.some, Array.prototype.every, Array.prototype.indexOf, Array.prototype.forEach, Object.keys, Object.getPrototypeOf (or simply use the excellent es5-shim)

Specify root-el

Also, you must change the root element of the <formly-form> tag (because IE8 cannot cope with custom tags in a replace directive):

<formly-form root-el="form"></formly-form>

or, if you want to support nesting of forms, use:

<div ng-form>
  <formly-form root-el="div"></formly-form>
</div>

📘

Wrap formly-form

It's a good idea to wrap your dependencies in your own abstraction. It makes life so much easier for you, especially if you're going to be doing this with all of your fields. Create your own directive that uses formly-form and adds the root-el attribute. I recommend you do this whether you need to support IE 8 or not.

Disable console calls

There are a few places where angular-formly will call console.warn to indicate you're using the API incorrectly. When you ship to production, you should disable these (whether or not you are supporting IE8). For more information, see Tips


Sponsor