第一篇文章是: "使用angular cli生成angular5项目" :https://ponent.html, 加入router-outlet:
然后修改admin-routing.module.ts:
运行: ng serve -o
直接输入地址:http://localhost:4200/admin
可以看到:
而输入网址:http://localhost:4200/admin/email
则会看到:
所以没问题.
生成Gurad.
ng g guard xxx这个命令将会生成xxx.guard.ts
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。