javascript - Pass variables in AngularJS $http GET? -


Is it possible to pass a variable on a server in the AngularJS $ http service? I want to be able to get "number" of certain items from the server and in the request I want to specify the number.

Thank you.

Yes, add it to the URL:

  $ http get ("/ users? items = 15") .success (function (data) {$ scope.users = data;});   

then items in your python handler for user will be auto-ask.get ("item").

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -