SHARE
TWEET
Untitled
a guest
Oct 18th, 2016
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- angular.module('app')
- .controller('DashCtrl', ['dashManager', function (manager) {
- this.queries = manager.queries;
- }]);
- angular.module('app')
- .service('dashManager', function () {
- var vm = this;
- vm.queries = [];
- var ServiceQuery = Parse.Object.extend('ServiceQuery');
- var query = new Parse.Query(ServiceQuery);
- query.find({
- success: function (results) {
- results.forEach(function (item) {
- vm.queries.push(item);
- });
- },
- error: function (error) {
- }
- });
- });
- // Template is basically just this
- <p>{{DashCtrl.queries.length}}</p>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
