Created
June 23, 2014 19:23
-
-
Save newtonlabs/f5cc8678fb53ba01fab8 to your computer and use it in GitHub Desktop.
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 netSales = hql() | |
.debug(true) | |
.dataset('YTD Net Sales') | |
.url('{gr.path.data.big-picture-spark-net-sales}') | |
.sort([{"_insert_order": "desc"}]); | |
var netSalesMix = hql() | |
.debug(true) | |
.dataset('YTD Net Sales Mix') | |
.url('{gr.path.data.big-picture-spark-net-sales-mix}') | |
.sort([{"_insert_order": "asc"}]); | |
// Query all the data on controller load | |
var loadData = function() { | |
hqlx.all([ | |
{url: netSales.url(), query: netSales()}, | |
{url: netSalesMix.url(), query: netSalesMix()} | |
]) | |
.then(function(data) { | |
console.log('all data', data); | |
}) | |
} | |
// Maybe Something like this: | |
var loadData = function() { | |
hqlx.all([netSales, netSalesMix]).then(function(data) { | |
console.log('all data', data); | |
}) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment