<div ng-repeat="(position, task) in Tasks.plannedTasks" ng-class="{'is-overdue': task.isOverdue}">
{{(task.plan - (TasksTimeSpent[task.id][task.worker]).toFixed(2)}}
</div>
<div style="font-size: 10px">
<span style="font-size: 2em">
<span style="font-size: 1em">
</span>
</span>
</div>
var executeSequence = function(promiseFn, values, acc) {
if (!values.length) return Promise.resolve(acc);
var promise = promiseFn(values.shift());
acc = acc || [];
return promise.then(function(result) {
acc.push(result);
return executeSequence(promiseFn, values, acc);
});
};
var requestUrl = function(url) {
return new Promise((resolve, reject) => {
request(url, function(error, response, body){
if (error) {
reject(error);
}
resolve(body);
});
}
executeSequence(requestUrl, ['http://google.com', ...])
.then(function(response) {
// response это массив из body для каждого из url по порядку
})
.catch(function(reason) {
});
.icon, .icon-first, .icon-second {
display: inline-block;
vertical-align: middle;
width: 40px;
height: 40px;
}
.icon-first {
background: url('icon-url-1');
}
.icon-second {
background: url('icon-url-2');
}