sách gpt4 ăn đã đi

angular - 如何在 Angular 应用程序中嵌入 Angular 元素?

In lại 作者:太空狗 更新时间:2023-10-29 18:37:52 30 4
mua khóa gpt4 giày nike

我有一个 Angular 元素,带有自定义标记名 - fancy-button。如何将 fancy-button 嵌入 Angular 应用程序?

我已经尝试了以下方法,但都没有用 -

  1. hiện hữu index.html/angular.json[scripts] 中导入 Angular 元素脚本并在 app.component.html 中嵌入 fancy-button (在 Angular 应用程序中运行的根组件)

  2. hiện hữu app.component.html 中导入了 Angular 元素脚本,还在 app.component.html 中嵌入了 fancy-button (在 Angular 应用中运行的根组件)

Cảm ơn

câu trả lời hay nhất

hiện hữu index.html 中,我添加了:


(cappapproot.js 是我的 Angular Element js 的名字)

这导致了Uncaught Error: Zone already loaded.为了解决这个错误,在pollyfills.ts我注释掉了这一行:

import 'zone.js/dist/zone'; // Included with Angular CLI.

关于angular - 如何在 Angular 应用程序中嵌入 Angular 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50726610/

30 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress