import { Component, Inject } from '@angular/core';
import { NavController, Modal } from 'ionic-angular';
import { PopupPage } from '../../components/modal/modal.page';
@Component({
templateUrl: 'build/pages/spot/spot.html',
providers: [ Modal ]
})
export class SpotComponent {
constructor(@Inject(Modal) private modal: Modal ) {}
}
相关问题
- Angular RxJS mergeMap types
- void before promise syntax
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Ignore Typescript errors in Webpack-dev-server
- Plugin with id 'com.google.gms.google-services
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Cannot find module 'redux' 怎么解决?
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
Just like @Pace commented, you can take a look at Ionic2 docs to see how to create a
Modal
.You don't have to include it in the
providers
array or in yourconstructor
like you're doing. Instead you should use theModal.create(...)
method like this: