This is how I did it… It works fine during development BUT it fails during the build process with error:
ngc error: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function…
In the app.module.ts file under @NgModule, providers array do something similar to the following:
Since RC0, i have the same kind of problem, i have added a provider to my project with ionic -g provider myprovider command.
But when i try to use it inside another page, i have a build error like
Error: Could not resolve '../../providers/myprovider/myprovider'
I am doing the import in my page like :
import { Myprovider } from '../providers/myprovider/myprovider';