Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Data Oriented Development with Angularjs
  • Table Of Contents Toc
  • Feedback & Rating feedback
Data Oriented Development with Angularjs

Data Oriented Development with Angularjs

By : Manoj Waikar
4.5 (4)
close
close
Data Oriented Development with Angularjs

Data Oriented Development with Angularjs

4.5 (4)
By: Manoj Waikar

Overview of this book

This book helps beginner-level AngularJS developers organize AngularJS applications by discussing important AngularJS concepts and best practices. If you are an experienced AngularJS developer but haven't written directives or haven't created custom HTML controls before, then this book is ideal for you.
Table of Contents (11 chapters)
close
close

Promise

While working with Angular/JavaScript, or any technology for that matter, there are scenarios when we need to make asynchronous calls—a very common example is of calling a web API. Obviously, when we call a remote API, we can't call it synchronously, because all further processing stops until that call completes. One of the ways of calling a function asynchronously is using a callback. However, callbacks make the code look convoluted. Sometimes, if you have deeply nested callbacks, then life becomes even more difficult. Promises solve these issues and make the intent of the code very clear. The Promise API is part of the ECMAScript 6 (ES6 Harmony) proposal, but there are implementations of it, which we can use even now.

A Promise object (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) is used for deferred and asynchronous computations. A Promise object is in one of the following states:

  • Pending: This is an initial state, not fulfilled...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY