M
M
magary42016-04-01 17:29:30
JavaScript
magary4, 2016-04-01 17:29:30

How to make the next call through a promise?

well, I have it in the body of the controller

$.ajax( {
                url: '/api/v2/..'
            } ).then( function ( data ) {
                scope.filters = data.Finder.filters;

                scope.$scan( );                
            } );

how to do it through promises and what is the profit from it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2016-04-01
@healqq

It's the same promise.
$.ajax()returns a promise to you,
after that you call the then method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question