You need to sign in to do that
Don't have an account?
Kenneth Link
How to load compiled Angular Typescript in Lightning Container via Static Resource
I am tyring to load a compiled Angular 5 SPA in a lightning:container, however I am experiencing issues when attempting to load the index.html from my app which is preventing loading additional files from the static resource.
Lightning app:
Lightning app:
<aura:application access="global" > <lightning:container src="{!$Resource.myApp+ '/index.html'}"/> </aura:application>index.html
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>myApp</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> </head> <body> <app-root></app-root> <script type="text/javascript" src="/resource/myApp/inline.bundle.js"></script> <script type="text/javascript" src="/resource/myApp/polyfills.bundle.js"></script> <script type="text/javascript" src="/resource/myApp/styles.bundle.js"></script> <script type="text/javascript" src="/resource/myApp/vendor.bundle.js"></script> <script type="text/javascript" src="/resource/myApp/main.bundle.js"></script> </body> </html>
Refused to load the script 'https://<mySandbox>.cs50.visual.force.com/resource/myApp/inline.bundle.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'nonce-70d472c7a148692e788790dca2cfbccb38ce420488c12502a4abbec1d5fb32a7'".Is there any way to do this corretly such that the scripts for my angular 5 app can load and run in the lightning-container?
Ron McCrerey
Did you ever resolve this issue?