Home > Mobile >  iframe with local html on React or Angular
iframe with local html on React or Angular

Time:12-13

I'm trying to show a local html file in an iframe. In both Angular and React, It works on development mode, but on production (AWS Amplify) I get the error "cannot match any routes".

I tried all the answers on previous similar questions but no solution for me. I tried many sorts of locations( in src, in public, creating assets folder etc ). I tried many sorts of address syntax such as:

<iframe src="address.html"></iframe>
<iframe src="./address.html"></iframe>
<iframe src="../address.html"></iframe>
<iframe src="./assets/address.html"></iframe>
<iframe src="../assets/address.html"></iframe>
<iframe src={process.env.BASE_URL   "/assets/address.html"}></iframe>
<iframe src="https://awsAmplifyAddress.com/assets/address.html"></iframe>

etc...

Help...

CodePudding user response:

Please read the below question first answer Html is added

  • Related