This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.$apply(function(){ | |
//$scopeの更新処理 | |
}); | |
// または | |
// $scopeの更新処理 | |
$scope.$apply(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// MobileServiceClient のインスタンスを作成 | |
// URL, KEY は管理画面に表示されているものを貼り付け | |
var client = new WindowsAzure.MobileServiceClient( | |
"URL", | |
"KEY" | |
); | |
// Item テーブルのインスタンス取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// MobileServiceClient のインスタンスを作成 | |
// URL, KEY は管理画面に表示されているものを貼り付け | |
var client = new WindowsAzure.MobileServiceClient( | |
"URL", | |
"KEY" | |
); | |
// Item テーブルのインスタンス取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.1.3.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// MobileServiceClient のインスタンスを作成 | |
// URL, KEY は管理画面に表示されているものを貼り付け | |
var client = new WindowsAzure.MobileServiceClient( | |
"URL", | |
"KEY" | |
); | |
// Item テーブルのインスタンス取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var client = new WindowsAzure.MobileServiceClient( | |
"URL", | |
"KEY" | |
); | |
// URL, KEY は管理画面に表示されているものを貼り付け | |
//このあと client を使ってモバイル サービス のデータにアクセスしていきます | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var itemTable = client.getTable("Item"); | |
itemTable.insert( | |
{text: "Sample Item", dynamic: true, date: "2014-08-28T12:00:00Z"} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// テーブルのすべての項目の読出します | |
itemTable.read() | |
.then(function(items){ | |
// 配列で項目が返ってきます | |
$each(items, function(i, e){ | |
// 項目 i に対する処理 | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onSuccess = function(position) { | |
alert('Latitude: ' + position.coords.latitude + '\n' + | |
'Longitude: ' + position.coords.longitude + '\n' + | |
'Altitude: ' + position.coords.altitude + '\n' + | |
'Accuracy: ' + position.coords.accuracy + '\n' + | |
'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + | |
'Heading: ' + position.coords.heading + '\n' + | |
'Speed: ' + position.coords.speed + '\n' + | |
'Timestamp: ' + position.timestamp + '\n'); |
OlderNewer