Angular 2 : System.import throws 403 (forbidding) error
If youâre new to angular 2 and getting following error when trying to import app folder (that contains your angular code), then carry on with reading đ
Error:Â XHR error (403 Forbidding) loading http://app/folder/path
That’s how I was importing the app folder to bootstrap the application.
<script> System.import('app/folder/path').catch(function(err){ console.error(err); }); </script>
After trying various solutions suggested on different forums, I have resolved this issue by adding a mapping to the app folder in system.config.js file. Like shown below:
I hope, you will find this article useful.