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
<doctype html5> | |
<div class="form-group" ng-controller="UploadCtrl"> | |
<input type="file" class="form-control" ng-file-select="onFileUpload($files)" /> | |
<button class="btn btn-success" ng-click="saveTruck()"> <span class="glyphicon glyphicon-ok"></span> Update Information</button> | |
</div> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script> | |
<script src="angular-file-upload.min.js"></script> | |
<script src="https://da189i1jfloii.cloudfront.net/js/kinvey-angular-1.1.8.js"></script> | |
<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
// Define the `User` model, and set the adapter to Kinvey. | |
App.User = Kinvey.User.extend({ | |
// `Kinvey.User` extends `Kinvey.Model` and thus also provides your | |
// users with `acl`, `createdAt`, and `lastModifiedAt` attributes. | |
// In addition, the following attributes are set: `username`, | |
// `password`, `email`, `firstName`, `lastName`, `fullName`, and | |
// `isLoggedIn`. Add your own here. | |
dateOfBirth: DS.attr('date') | |
}); |
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
// Define a `Book` model, and set the adapter to Kinvey. | |
App.Book = Kinvey.Model.extend({ | |
// `Kinvey.Model` provides your models with three attributes: | |
// `acl`, `createdAt`, and `lastModifiedAt`. Add your own here. | |
author: DS.attr('string'), | |
title : DS.attr('string') | |
}); | |
App.BookAdapter = Kinvey.RESTAdapter; |
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
// Replace `App Key` and `App Secret` with your application credentials. | |
var kinveyOptions = { | |
appKey : 'App Key', | |
appSecret : 'App Secret', | |
debug : true // Enable debug mode (development only). | |
}; | |
// Add the Kinvey initializer. | |
Ember.Application.initializer({ | |
name : 'kinvey', |
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="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.4.0/ember.min.js"></script> | |
<script src="ember-data.js"></script> | |
<script src="//da189i1jfloii.cloudfront.net/js/kinvey-ember-2.0.0-beta.js"></script> | |
</body> | |
</html> |
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
app.controller('DataCtrl', ['$scope', '$kinvey', function($scope, $kinvey) { | |
$kinvey.DataStore.get('collection-name', 'entity-id').then(function(entity) { | |
$scope.entity = entity; | |
}); | |
}]); |
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
app.controller('DataCtrl', ['$scope', '$kinvey', function($scope, $kinvey) { | |
$kinvey.DataStore.get('collection-name', 'entity-id').then(function(entity) { | |
$scope.entity = entity; | |
$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
<html> | |
… | |
<script> | |
var myApp = angular.module('MyApp', ['kinvey']); | |
var $injector = angular.injector(['ng', 'kinvey']); | |
$injector.invoke(['$kinvey', function($kinvey) { | |
$kinvey.init({ | |
appKey : 'App Key', | |
appSecret : 'App Secret' |
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
<html ng-app="MyApp"> | |
… | |
<script> | |
var myApp = angular.module('MyApp', ['kinvey']); | |
myApp.run(function($kinvey) { | |
$kinvey.init({ | |
appKey : 'App Key', | |
appSecret : 'App Secret' | |
}); | |
}); |
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="//da189i1jfloii.cloudfront.net/js/kinvey-angular-1.1.4.min.js"></script> |
NewerOlder