Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Custom component: is not a known element:

$
0
0

Hi guys,
sorry for this topic (i have read other in this furum) but i can’t find a solution.

I have generate a new ionic component with command:

ionic g component WelcomeSlider

into …/src/component/welcome-slider/

this is “welcome-slider.component.ts”

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-welcome-slider',
  templateUrl: './welcome-slider.component.html',
  styleUrls: ['./welcome-slider.component.scss'],
})
export class WelcomeSliderComponent implements OnInit {

  constructor() { }

  ngOnInit() {}

}

this is “app.module.ts”

...
import { WelcomeSliderComponent } from '../components/welcome-slider/welcome-slider.component';

@NgModule({
  declarations: [AppComponent, WelcomeSliderComponent],
   ...
})

export class AppModule {}

this is “my.page.html”

<app-welcome-slider></app-welcome-slider>

And this is my console error in the browser:

core.js:13987 'app-welcome-slider' is not a known element:
1. If 'app-welcome-slider' is an Angular component, then verify that it is part of this module.
2. If 'app-welcome-slider' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

what am I wrong?
Thanks so much for your help

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>