# angular_sub_app **Repository Path**: wml7698/angular_sub_app ## Basic Information - **Project Name**: angular_sub_app - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-11 - **Last Updated**: 2021-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # angular sub app ## v360_web_protal 配置 ```javascript // avt2/app/app-root/app.component.ts // this.planet.registerApps() 里面添加 { name: 'smart-purchasing', hostParent: '#sub-app-container', routerPathPrefix: '/avatar2/module/smart-purchasing', selector: 'smart-purchasing-root', preload: false, switchMode: SwitchModes.default, loadSerial: true, manifest: '/smart_purchasing_proxy/sp-web/manifest.json', scripts: [ '/smart_purchasing_proxy/sp-web/main.js', ], styles: [ '/smart_purchasing_proxy/sp-web/styles.css' ], }, ``` ```javascript // proxy.config.js 添加 PROXY_CONFIG['/smart_purchasing_proxy'] = { target: 'http://localhost:3033', secure: false, changeOrigin: true, pathRewrite: { '^/smart_purchasing_proxy': '' } }; ``` ```javascript // 好像不需要配置 也可以 // avt2/app/app-root/app-routing.module.ts 添加路由 { path: 'avatar2/module/smart-purchasing', component: EmptyComponent, canActivate: [AuthGuard], children: [ { path: '**', component: EmptyComponent } ] }, ``` ## 子应用 - **子应用** **v360_web_protal** 放在**同一文件夹**下 - 下载依赖: **npm install** - 启动: **npm run start** ## 访问页面 - **http://localhost:3000/avatar2/module/smart-purchasing**