我有一个 Angular 应用程序作为我的 Piral 应用程序的 Pilet。我正在尝试访问通过 PageComponentProperties 从 Piral 应用程序传递的配置值。如本页所述,,我正在尝试访问 AppModule 中的页面组件属性(“PageComponentProps”),如下所示。
export class AppModule {
@Input('Props') public props: PageComponentProps<any>;
}
我正在按如下方式注册角度分量,
app.registerPage(
/test-location
, app.fromNg(AppModule));
确保在 pilet 的 package.json 中具有以下结构:
"devDependencies": {
...
"app-shell": "0.0.0" -> your version for your app-shell
...
},
"peerDependencies": {
...
"app-shell": "*"
...
}