File

src/pages/popover-profile/popover-profile.ts

Metadata

selector page-popover-profile
templateUrl popover-profile.html

Index

Properties
Methods

Constructor

constructor(viewCtrl: ViewController, modalCtrl: ModalController, navParams: NavParams)
Parameters :
Name Type Optional Description
viewCtrl ViewController
modalCtrl ModalController
navParams NavParams

Methods

detectFiles
detectFiles(event: )
Parameters :
Name Type Optional Description
event
Returns : void
goToProfilePage
goToProfilePage()
Returns : void

Properties

Public modalCtrl
modalCtrl: ModalController
Type : ModalController
Public navParams
navParams: NavParams
Type : NavParams
Private uidContact
uidContact: string
Type : string
Public viewCtrl
viewCtrl: ViewController
Type : ViewController
import { Component } from '@angular/core';
import { ModalController, ViewController, IonicPage, NavParams } from 'ionic-angular';
import { UpdateImageProfilePage } from '../update-image-profile/update-image-profile';

@IonicPage()
@Component({
  selector: 'page-popover-profile',
  templateUrl: 'popover-profile.html',
})
export class PopoverProfilePage {

  private uidContact:string;

  constructor(
    public viewCtrl: ViewController,  
    public modalCtrl: ModalController,
    public navParams: NavParams
  ) {
    this.uidContact = navParams.get('uidContact');
    // controllo piattaforma per il caricamento img da mobile o browser
  }
  /**
   * 
   * @param event 
   */
  detectFiles(event) {
    console.log('event: ',event);
    let profileModal = this.modalCtrl.create(UpdateImageProfilePage, {event: event}, { enableBackdropDismiss: false });
    profileModal.present();
    this.viewCtrl.dismiss();
  }
  /**
   * 
   */
  goToProfilePage(){
    let profileModal = this.modalCtrl.create(UpdateImageProfilePage, {uidContact: this.uidContact}, { enableBackdropDismiss: true });
    profileModal.present();
  }

}
<!--
  Generated template for the PopoverProfilePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
</ion-header>


<ion-content padding>
    <ion-list>
      <!--<ion-list-header>Ionic</ion-list-header>-->
      <button ion-item (click)="goToProfilePage()">Mostra foto</button>
      <input type="file" accept="image/x-png,image/gif,image/jpeg" name="file" id="file" class="inputfile" (change)="detectFiles($event)"/>
      <label ion-item for="file">Carica foto</label>
      <button ion-item >Scatta foto</button>
      <button ion-item >Rimuovi immagine</button>
    </ion-list>
</ion-content>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""