fork(1) download
  1. import { Component,ViewChild, Renderer } from '@angular/core';
  2. import { IonicPage, NavController, NavParams } from 'ionic-angular';
  3. import {Cordova} from "@ionic-native/core";
  4.  
  5. declare var window: any;
  6. declare let cordova: any;
  7.  
  8. @IonicPage()
  9. @Component({
  10. selector: 'page-photo',
  11. templateUrl: 'photo.html'
  12. })
  13.  
  14. export class PhotoPage {
  15. constructor (){
  16. }
  17.  
  18. tryPlugin2() {
  19. let phone: string = "my number here";
  20. //Set the value of phone
  21. let message: string = "test";
  22. //Set the value of message
  23. let options = {
  24. "replaceLineBreaks": false
  25. };
  26.  
  27. //Call the function
  28. window.sms.send(phone,message,options,(result: any) => {
  29. console.log("SuccessFully Done...");
  30. }, (err: any) => {
  31. console.log("An error has occuered :" + err.code);
  32. })
  33. }
  34. }
Runtime error #stdin #stdout #stderr 0.02s 9568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:1:0 SyntaxError: import is a reserved identifier:
prog.js:1:0 import { Component,ViewChild, Renderer } from '@angular/core
prog.js:1:0 ^