Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

best pratices #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions src/pages/modals/basic/pages.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { Component } from '@angular/core';

import { ModalController, Platform, NavParams, ViewController } from 'ionic-angular';


@Component({
templateUrl: 'template.html'
})
export class BasicPage {
constructor(public modalCtrl: ModalController) { }

openModal(characterNum) {

let modal = this.modalCtrl.create(ModalContentPage, characterNum);
modal.present();
constructor(private modalCtrl: ModalController) { }
openModal(characterNum:number) {
this.modalCtrl.create(ModalContentPage, characterNum).present();
}
}

Expand Down Expand Up @@ -53,14 +48,14 @@ export class BasicPage {
`
})
export class ModalContentPage {
character;
private character:any;

constructor(
public platform: Platform,
public params: NavParams,
public viewCtrl: ViewController
private platform: Platform,
private params: NavParams,
private viewCtrl: ViewController
) {
var characters = [
const characters = [
{
name: 'Gollum',
quote: 'Sneaky little hobbitses!',
Expand Down