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

Problem with provider

$
0
0

@pmartinez1929 wrote:

I have a problem calling a provider into a page,

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

import { ProviderLlantasProvider } from '../../providers/provider-llantas/provider-llantas';

export class SectionPage {

constructor(private appData:ProviderLlantasProvider) {
}

}

The provider is declared in the app.module

@NgModule({
declarations: [
MyApp,
HomePage,
ListPage,
SectionPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
HttpModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
ListPage
],
providers: [
StatusBar,
SplashScreen,
ProviderLlantasProvider,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}

But, when i put in any page I have this error

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49308

Trending Articles



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