我正在使用此命令生成 angular 10 项目:
npx create-single-spa --moduleType app-parcel
但是我注意到在生成 angular 10 项目后,app.component.ts 没有被使用。
export class AppComponent {
public title = 'singleangular';
constructor() {
console.log('testing');
}
}
console.log 命令永远不会被执行。这怎么可能发生?如果我使用 ng new 命令,这肯定会被执行。如果这是预期的,请告知。然后如何在单个水疗中心使用 angular 10?谢谢
这是默认组件:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
public title = 'singleangular';
constructor() {
console.log('testing');
}
}
添加到 entryComponents 是没用的,我想如果有人使用 npx create-single-spa 命令生成 ng 项目可以立即看到这个问题。
不知道这里有什么问题
似乎使用 npx create-single-spa 创建的 angular 项目只能在 single-spa 中加载,不能单独加载
我想知道我们是否可以在不使用 single-spa 的情况下单独启动和调试创建的 angular 项目,然后一旦完成,部署并让 single-spa 使用它