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

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 -

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

django - CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False -