Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230080

Ionic 3 directive module error

$
0
0

Can’t find a way to get Directives to work on Ionic 3.

Tried many ways o import it, still having this error:

core.js:1448 ERROR Error: Uncaught (in promise): Error: Template parse errors:
'game-item' is not a known element:
1. If 'game-item' is an Angular component, then verify that it is part of this module.
2. If 'game-item' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
<ion-content padding>
	[ERROR ->]<game-item></game-item>
</ion-content>

game-item.module.ts

import { GameItemDirective } from './game-item';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { IonicModule } from 'ionic-angular'

@NgModule({
	imports: [IonicModule],
	declarations: [GameItemDirective],
	exports: [GameItemDirective],
	entryComponents: [],
	schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class GameItemModule {}

app.module.ts

@NgModule({
	declarations: [
		MyApp
	],
	imports: [
		GameItemModule,
		BrowserModule,
		IonicModule.forRoot...

Viewing all articles
Browse latest Browse all 230080

Trending Articles



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