Struggling to figure out how to import my view controller for usage in a provider within Ionic 2.
import { ModalController, ViewController, NavController } from "ionic-angular";
@Injectable()
export class DynamicModal<T extends IHasId> {
modalOptions: DynamicModalOptions<T>;
constructor(public modalCtrl: ModalController, public viewCtrl: ViewController)
Attempting it this way triggers the following error message:
No provider for ViewController
While View Controllers work seamlessly when injected into pages, I am looking to centralize creation and dismissal logic to avoid duplicating it every time I use that modal.
Any suggestions on how to inject a view controller into a modal?