I am creating a URL in my angular app using new URL as below. This works on all browsers except IE11.
So I tried to add "url-polyfill" to my "package.json" and used import 'url-polyfill' in polyfills.ts file.
But still i am getting object doesn't support action error for this line in IE11. Can anyone provide some thoughts on what i am doing wrong here.
url = new URL(url).pathname.toLowerCase()
I am creating a URL in my angular app using new URL as below. This works on all browsers except IE11.
So I tried to add "url-polyfill" to my "package.json" and used import 'url-polyfill' in polyfills.ts file.
But still i am getting object doesn't support action error for this line in IE11. Can anyone provide some thoughts on what i am doing wrong here.
url = new URL(url).pathname.toLowerCase()
Share
Improve this question
asked Nov 27, 2019 at 13:42
Deadpool_erDeadpool_er
2551 gold badge4 silver badges25 bronze badges
1 Answer
Reset to default 11Angular includes imports to core-js@3 (you don't need to install something), so try these polyfills instead:
import 'core-js/features/url';
import 'core-js/features/url-search-params';