Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let prompt = Alert.create({
- title: 'Subscribe to our service',
- message: "All the fields are necessary",
- inputs: [
- ...
- {
- name: 'path',
- placeholder: 'Path',
- value: JSON.stringify(this.testArray)
- },
- {
- name: 'cycle',
- placeholder: 'Cycle: once/weekly/monthly'
- },
- {
- name: 'object_type',
- placeholder: 'Farm/Solarpanel/plain'
- },
- ],
- buttons: [
- {
- text: 'Cancel',
- handler: () => {
- console.log('Cancel clicked');
- }
- }
- ]
- });
- this.nav.present(prompt);
- import { Modal, NavController, NavParams } from 'ionic-angular';
- @Component(...)
- class YourPage {
- constructor(nav: NavController) {
- this.nav = nav;
- }
- presentSubscriptionModal() {
- let subscriptionModal = Modal.create(Subscription, { yourParam: paramValue });
- this.nav.present(subscriptionModal);
- }
- }
- @Component(...)
- class Subscription{
- constructor(params: NavParams) {
- let param = params.get('yourParam');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement