javascript - How to create promises with the new Breeze Angular Service? -


i'm updating angular/breeze application new breeze angular service (link)

the documentation explains how remove q.js file , on. i'm stuck replacing method:

primepromise = $q.all([getlookups(), getspeakerpartials()])     .then(extendmetadata)     .then(success);  return primepromise; 

or

$q.when(); 

how should replace piece of code new breeze angular service?

you worried 2 different things.

  1. how hold of $q
  2. my $q missing critical methods such .when , all

you have inject $q service before can use showing in code snippet. check angular documentation see how if don't know.

as point #2, make sure running angular v.1.2 , not older version!

before v.1.2, $q extremely limited ... why urged folks stick q.js. example, promise offered then method.

as of v.1.2, promise offers catch , finally , $q has all , when methods.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -