Answer the question
In order to leave comments, you need to log in
Error in module (Angular) Who can help?
I have "AdminModule" { } highlighted in red, when I hover over "AdminModule" I get this:
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
I have this line in tsconfig: " experimentalDecorators": true , (I changed this value to folse and there are no results) - don't ask why) I'm a beginner.
Here is the code:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {RouterModule} from '@angular/router';
import { AdminLayoutComponent } from './shared/components/admin-layout/admin-layout.component';
import { LoginPageComponent } from './login-page/login-page.component';
@NgModule({
declarations: [AdminLayoutComponent, LoginPageComponent],
imports: [
CommonModule,
RouterModule.forChild([
{path: '', component: AdminLayoutComponent, children: [
{path: '', redirectTo: '/admin/login', pathMatch: 'full'},
{path: 'login', component: LoginPageComponent}
]}
])
],
exports: [RouterModule]
})
export class AdminModule { } <--- (Еще раз, AdminModule подчеркнут красным)
Answer the question
In order to leave comments, you need to log in
import this module into your AppModule application module, or if this is the root module, then bootstrap, in short, you need to use it somewhere in the project, then the configs from the project will be applied to it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question