新平台

菜单:
一级菜单

  1. yun主机 cloud-host
    overview
    host-list

  2. yun服务
    product
    service

  3. system-mgmt xitongguanli
    tenant
    organ
    user
    table 增删改查

登录,修改密码,公共组件(pageT,pageMenu,)和模块

使用命令行生成文件目录:
ViewEncapsulation这个参数的使用!查看一下!
ng g c test-c --view-encapsulation None (c:component,在module中声明)
模块:ng g m pages/cloud-host --routing -d
模块主组件:ng g c pages/cloud-host -d
第一个组件:ng g c pages/cloud-host/components/overview -d
1.pages.routing中增加自己模块
2.重写cloud-host的routing文件,并在module中引入该routing(并去除之前的routing名字)
3.在模块的主组件html中用router-outlet,否则不跳转的
第二个组件:ng g c pages/cloud-host/components/host-list -d

路由总是报错,cli版本太高了!!什么原因啊???

注意:组件名字不需要“引号”
错误:{path: ‘overview’, component: ‘OverviewComponent’}, // 概览
正确:{path:’overview’,component:OverviewComponent},// 概览
错误图片:
component:string is not assignable to type “Route”…

如果没有这个:encapsulation: ViewEncapsulation.None
文件内部的样式是不会继承公共样式的!!!所以,必须有!

文件记录:

1.menu有两个文件,用ba-page-menu这个,不用baPageMenu
2.ba-page-menu中,this.menus用的接口和假数据,假数据是要去掉的
3.登出:在baPageTop中,事件上传到pages文件中,onLogout:调用退出接口,清空login-user-session
4.goLogin函数在base-page页面中,跳到登录页
5.切换租户和组织要订阅,刷新页面函数
6.invite-login中有location的使用!

猜你喜欢

转载自blog.csdn.net/weixin_42995876/article/details/82380650
今日推荐