Нет соответствующего экспорта в «Модуле» для импорта «Имя компонента». Когда я зависаю над импортом в коде VS, в нем говорится, что «Модуль -модульное местоположение» объявляет «компонент» локально, но он не экспортируется ». Спасибо за любую помощь! < /P>
Код компонента: < /p>
Код: Выделить всё
import { Component } from '@angular/core';
@Component({
selector: 'event-view',
imports: [],
templateUrl: './event-view.html',
styleUrl: './event-view.css'
})
export class EventView { }
< /code>
код модуля: < /p>
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { EventView } from './event-view/event-view';
@NgModule({
declarations: [ EventView ],
imports: [
CommonModule
],
exports: [ EventView ]
})
export class PagesModule { }
< /code>
app.routes.ts:
import { Routes } from '@angular/router';
import { EventView } from '../Pages/pages-module';
export const routes: Routes = [
{
path: '/recipient/:id',
component: EventView
}
];
Подробнее здесь: https://stackoverflow.com/questions/797 ... recognized
Мобильная версия