qwelukasz qwelukasz 04.08.2015, 09:38:19 2 #angularjs function getTemplates() { model.loading = true;```` Template.types.query().$promise.then(function (response) {``` model.media = response.media;``` });``` Template.categories.query().$promise.then(function (response) {``` model.categories = response.categories;``` });``` Template.attributes.query().$promise.then(function (response) {``` model.attributes = response.attributes;``` });`````` Template.templates.query().$promise.then(function (response) {``` model.templates = response.templates;``` });``` model.loading = false;``` }```jak w angularze wywołać model.loading = false` dopiero gdy wszystkie query się skończą? Szamieless Cronox
function getTemplates() {model.loading = true;`
model.media = response.media;``` Template.types.query().$promise.then(function (response) {```
Template.categories.query().$promise.then(function (response) {``` });```
});``` model.categories = response.categories;```
model.attributes = response.attributes;``` Template.attributes.query().$promise.then(function (response) {```
``` });```
model.templates = response.templates;``` Template.templates.query().$promise.then(function (response) {```
model.loading = false;``` });```
model.loading = false` dopiero gdy wszystkie query się skończą?``` }```
jak w angularze wywołać