question

MeetBhatt-9179 avatar image
0 Votes"
MeetBhatt-9179 asked AmosWu-MSFT commented

SPFx Webpart With Angular Elements not working in SharePoint page

Hello Everyone,

I have created a demo of SPFx Webpart With Angular Elements with reference to this link.

I have successfully bundle that project and serve that project with "npm run bundle" and "gulp serve" commands.

It is running correctly in workbench / local. Please refer to below screenshot,
84640-ss.png

When I have published that solution using "gulp bundle --ship" and "gulp package-solution --ship" commands. .sppkg file has been generated successfully. But when I add that app to my SharePoint page it throws a below error,

84762-sss.png

If anyone has an idea for the same. Please let me know.

Thanks in Advance.

office-sharepoint-online
ss.png (35.4 KiB)
sss.png (122.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AmosWu-MSFT avatar image
0 Votes"
AmosWu-MSFT answered AmosWu-MSFT commented

I followed the steps of the blog to create and publish SPFX, and it works well.
84760-image.png
According to your screenshot, your SPFX webpart was successfully rendered, but the data does not seem to be received. You could print or debug the code where you obtained the data to see if the data was successfully returned. Before running the packaging command, I suggest you run gulp clean first, then run npm install, and finally run the packaging command.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (94.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi AmosWu-MSFT ,

Thanks for your quick response.

I have refereed steps as you have suggests, but i have faced same issue which i have mentioned in the question.

Can you please share your code link, if possible?

Thanks in Advance.

0 Votes 0 ·

I just download the code of the blog from Github. Then made some small changes to adapt to my environment.
You could get it here:https://github.com/Amos-MSFT/SharePoint-FrameWork-Demos/tree/master/SPFxAngular9-master

0 Votes 0 ·