You need the async library for this function
var saveBatch = function(source, callback, limit) {
limit = limit || 20;
var nbSlices = Math.ceil(source.length / limit), i = 0;
async.whilst(function() {
return i < nbSlices;
},| class Tab extends React.Component { | |
| static propTypes = { | |
| active, | |
| title, | |
| children | |
| }; | |
| render() { | |
| return ... | |
| } |
| /// Everything defined here is defined in the scope of that module | |
| /// so it wont pollute anything | |
| var privateVar = "test"; | |
| var privateFn = function() { | |
| // process stuff here | |
| // we can use privateVar | |
| } |
You need the async library for this function
var saveBatch = function(source, callback, limit) {
limit = limit || 20;
var nbSlices = Math.ceil(source.length / limit), i = 0;
async.whilst(function() {
return i < nbSlices;
},| $stateProvider | |
| .state('items', { | |
| abstract: true, | |
| url: "/items", | |
| resolve :{ | |
| items: ['DataSource', function(DataSource) { | |
| return DataSource.fetchItems(); | |
| }] | |
| } | |
| }) |
| // You can do that in your Chrome Console | |
| // Load the initial object, like an Attempt | |
| var attempt = new Parse.Object("Attempt"); | |
| attempt.id = "myId"; | |
| attempt.fetch(); | |
| // Get the relation "handler" from the attempt object | |
| var relation = attempt.relation("products"); |
In your project root:
npm install grunt-handlebars
Then edit your Gruntfile and add BEFORE the initConfig statement :
grunt.loadNpmTasks('grunt-handlebars');Add to your Grunt config the following part