Month: December 2018

ionic audio with HTML5

ไม่ต้องใช้ NativePlugin ก็ใช้ ความสามารถของ HTML5 เล่นเพลงได้เลย import { Component } from '@angular/core'; import { NativeAudio } from '@ionic-native/native-audio/ngx'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'] }) export class HomePage {…

natvieplugin.page.ts

import { Component, OnInit } from '@angular/core'; import { Flashlight } from '@ionic-native/flashlight/ngx'; @Component({ selector: 'app-nativeplugin', templateUrl: './nativeplugin.page.html', styleUrls: ['./nativeplugin.page.scss'], }) export class NativepluginPage implements OnInit { constructor(private flashlight: Flashlight)…

app.module.ts

import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { SplashScreen } from…

code day 2

<ion-header> <ion-toolbar> <ion-title>nativeplugin</ion-title> </ion-toolbar> </ion-header> <ion-content padding> <ion-button (click)="openflash()"> open flash light </ion-button> </ion-content> <ion-button shape="round" color="primary" fill="outline" href="/nativeplugin"> go to native plugin</ion-button>