These are chat archives for angular/angular-2-ionic-2

10th
Aug 2016
Christiaan Lombard
@christiaan-lombard
Aug 10 2016 11:35
Can someone explain why there is a problem with the following:
import { Component } from '@angular/core';
import { FormGroup, Validators, FormBuilder } from '@angular/forms';
import { Platform, NavController, MenuController, NavParams, ViewController, ToastController } from 'ionic-angular';

@Component({
  templateUrl: 'build/form.modal.html'
})
export class FormModal {

  public model: any;

  constructor(
    private view: ViewController, 
    private toast: ToastController
    ) {}

  // this causes problems ??
  save2(){

    // TODO save the model

    // toast AND close modal
    this.toastCreateSuccess();
    this.view.dismiss(this.model);

  }

  // this works
  save(){

    // TODO save the model

    // toast THEN close modal
    this.toastCreateSuccess().then(
        () => this.view.dismiss(this.model)
    );

  }

  toastCreateSuccess(){
    return this.toast.create({
      message: 'Site "' + this.model.name + '" added',
      duration: 3000
    }).present();
  }

}
If I close the view without waiting for the toast.present() the toast overlay gets stuck
harsh-innovify
@harsh-innovify
Aug 10 2016 14:31

Hello Guys

I've issue with samsung devices with ionic 2.0.0-beta.17 version

Rennie Bevineau
@Renniesb
Aug 10 2016 17:40
I'm using the drag and drop dependency in ionic 2 but when I try to run my code I get the error- c:\Users\Rennie\projects\languageboost\star_connect_beta\node_modules\ng2-dnd\ng2-dnd.ts:7
import {DragDropConfig} from './src/dnd.config';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
This is my codebase
https://github.com/Renniesb/star_connect_beta/tree/experimental