williamjord Posted October 25, 2022 Report Share Posted October 25, 2022 I am looking to build an Angular 8 application and call Caspio datapages from inside. The standard approach to using a Caspio Datapage is to embed a script tag as follows: <script type="text/javascript" src="https://c1acu417.caspio.com/dp/A57E7000f6812a2641704a929225/emb"></script> However, it does not seem to be working. So, for example, I am doing the following: Setup a StackBlitz ( https://stackblitz.com/edit/angular-m6cshx?file=src%2Fapp%2Fapp.component.html ) Nothing shows up. Here, it is working in static html: https://codesandbox.io/s/cocky-dawn-8l7pvnyfo Does anyone have any experience or ideas as how to achieve this in Angular? Why cannot I simply embed that script? Quote Link to comment Share on other sites More sharing options...
0 vidierre Posted October 26, 2023 Report Share Posted October 26, 2023 I am not a strong angular expert, but you cannot add script elements in the html page of your (angular) components. If you google around the web you can found a lot of examples. A page where the concept is well eplained is this https://medium.com/@Codeible/adding-loading-and-using-javascript-in-angular-3281ea4b056b The basic concept is that you have to make available the script and then create a script element object. Quote Link to comment Share on other sites More sharing options...
Question
williamjord
I am looking to build an Angular 8 application and call Caspio datapages from inside.
The standard approach to using a Caspio Datapage is to embed a script tag as follows:
However, it does not seem to be working.
So, for example, I am doing the following:
Setup a StackBlitz ( https://stackblitz.com/edit/angular-m6cshx?file=src%2Fapp%2Fapp.component.html )
Nothing shows up.
Here, it is working in static html:
https://codesandbox.io/s/cocky-dawn-8l7pvnyfo
Does anyone have any experience or ideas as how to achieve this in Angular?
Why cannot I simply embed that script?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.