摘要:
1. vscode编辑器快速新建主路由: ng-router 注意修改为 根路由为:‘forRoot()’ app-route.module.ts; { path:'',redirectTo:'/login',pathMatch:'full' } 当路由为空的时候,会重定向到/login路由,必须加 阅读全文
摘要:
扩展运算符( spread )是三个点(...)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。 1 console.log(...[1,2,3]); // 1 2 3 2 console.log(1,...[1,2,3],5); // 1 1 2 3 5 合并多个数组 通过p 阅读全文