I am encountering a problem. I'm starting an application with Angular 11.
I'm trying to create a resister page: signup.
- I created a module "users" which will contain every module about user (signup, signin, info...)
- Inside the users module, I created a module signup which will contain every module for the register page (some information, forms...)
- Inside signup module, I created 2 components : SignupComponent (=some informations) and FormSignUpComponent (=form register).
when I lunch the app I get this error message :
'i-form-sign-up' is not a known element:
1. If 'i-form-sign-up' is an Angular component, then verify that it is part of this module.
2. If 'i-form-sign-up' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
However, FormSignUpComponent is declared inside SignupModule :/
Can you help me ?
I have this hierarchy :
SignupModule :
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SignupComponent } from './signup.component';
import { UiModule } from '../../core/ui/ui.module';
import { FormSignUpComponent } from './form-sign-up/form-sign-up.component';
@NgModule({
declarations: [
SignupComponent,
FormSignUpComponent
],
imports: [
CommonModule,
UiModule
]
})
export class SignupModule { }
SignUp.component.html :
<div class="form-container">
<i-form-sign-up></i-form-sign-up>
<section>
... some informations
</section>
</div>
FomSignUpComponent :
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'i-form-sign-up',
templateUrl: './form-sign-up.component.html',
styleUrls: ['./form-sign-up.component.css']
})
export class FormSignUpComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…