ionic 2 : Create Page (ionic generate page)

ionic 2 : Create Page สร้าง Page ด้วยคำสั่ง ionic generate page เนื่องจาก ionic 2 เมื่อสร้างไฟล์ใหม่จะต้องมีไฟล์ที่ประกอบไปด้วย ไฟล์ .html, .ts (typescript), .scss

Read More

ionic & ngCordova GPS Map

ให้เปิดไฟล์ index.html ในส่วนของ Header ให้ แปะไว้ด้านบนลองลงมาจาก style.css <script type=”text/javascript” src=”https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=true&amp;”> </script> ให้เปิดไฟล์ app.js แล้วแปะ Controller ลงไป .controller(‘MapCon’, function($scope, $cordovaGeolocation, $ionicLoading)

Read More

ionic & ngordova

ngCordova คือ plugins เพื่อให้ ionic สามารถสั่งงานไปยัง iOS & Android device ได้ เช่นสามารถสั่งให้ส่งเสียงร้อง สั่งให้ทำงานร่วมกับกล้อง ร่วมกับ location สามารถสั่งให้อุปกรณ์ต่างๆ ทำงาน โดยสามารถเขียนคำสั่งได้จาก AngularJS ในการควบคุมการทำงาน ซึ่งสามารถเข้าใช้

Read More