melcor76 / reactangular Goto Github PK
View Code? Open in Web Editor NEWHow to use Angular Elements in React
How to use Angular Elements in React
I tried to rebuilding your example with angular 9 and @nrwl/workspace 9.4.2
I always got this issue
Uncaught Error: A platform with a different configuration has been created. Please destroy it first.
after running npm run update
in your project the same error appeard in your repo as well.
I could only fix this problem by following other examples which are always creating angular applications and compiling them down with ngx-build-plus
or cat
to one file
here is the application's angular.json which is used as a library (hack)
"angular-lib-app": {
"projectType": "application",
"schematics": {
"@nrwl/angular:component": {
"style": "scss"
}
},
"root": "apps/angular-lib-app",
"sourceRoot": "apps/angular-lib-app/src",
"prefix": "web-components",
"architect": {
"build": {
"builder": "ngx-build-plus:browser",
I use this build command:
ng build angular-lib-app --single-bundle --prod --output-hashing none
during development:
ng build angular-lib-app --single-bundle --prod --output-hashing none --watch
and add to angular.json angularapp
"scripts": [
"dist/apps/angular-lib-app/main.js"
]
and reactapp
"scripts": [
"node_modules/zone.js/dist/zone.js",
"dist/apps/angular-lib-app/main.js"
]
do you have a working solution in angular 9 which is using a library build?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.