Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Ionic3 - How can I inject Page to Provider

$
0
0

@byeongsoek wrote:

Hello.

I have AddPage and Provider.

AddPage has a method and I want to call it on Provider.

So I imported { AddPage } from ‘…/…/pages/add/add’; and inject dependency(public add:AddPage on constructor)

import { AddPage } from '../../pages/add/add';
  constructor(
    public add: AddPage
  )

but it gives me an error below and I can only see white screen when I run it on android emulator.

I know injecting a Page on Provider to use method is unusual(maybe improper), but I’d like to use that way anyway.

Is there any solution?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



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