I have seen answers on StackOverflow where people suggest furnishing a callback function to an AngularJS service.  app.controller('tokenCtrl', function($scope, tokenService) {     tokenService.getTokens(function callbackFn(tokens) {...
I want to implement a dynamic loading of a static resource in AngularJS using Promises. The problem: I have couple components on page which might (or not, depends which are displayed, thus dynamic) need to get a static resource from the server. Onc...
This question already has an answer here:...
I'm trying to use the Pinterest JavaScript SDK to get some pin data for a project. I have a method in a Pinterest service I created that gets called in my HomeController. I tried throwing the response inside of a promise so I could put it on my H...
I have a ui-router StateProvider and need to pick between controllers & views based on external data, so I used TemplateProvider and ControllerProvider.  If I only had the TemplateProvider it all works fine, but when I add the ControllerProvider...
What's the equivalent of Angular's $q in Angular2?  Specifically, I'm looking for $q.when, which allowed you to do something like:  return $q.when(['TestResponse']);...
Angular 1.5.8 implements a $q.race() method which takes an array of promises and returns a promise which is resolves with the value of the first resolved promise.  However i am stuck with angular 1.4 for now and need some kind of functionality like a...
I've run into quite a novel problem with ui router. I'm basically trying to query my API for a template url, which is stored and returned as a Resource object. The problem, is it seems that the templateUrl function is returning as undefined....
I have 3 parallel promises or api requests once all teh three are done, I need to call another api request based on the second promise and then finally call .then( of $q.all  Here is the code   getAllLocations() {     //make a promise call for all he...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.