需求:先需要增加一个登录模块
1 创建登录模块
ng g m testLogin
1.1 将共享模块导入到登录模块中
import { NgModule } from '@angular/core';
import { TestLoginComponent } from './test-login/test-login.component';
import { SharedModule } from '../shared/shared.module';
@NgModule({
imports: [
SharedModule
],
declarations: [TestLoginComponent]
})
export class TestLoginModule { }