Questions tagged as 'angularjs-services'

1
answer

AngularJS - Unknown provider

I'm trying to create a Service in AngularJS but the error is occurring: Error: [$ injector: unpr] Unknown provider: $ scopeProvider
asked by 11.05.2015 / 04:52
2
answers

Angular 7 - Popular object in return API service. httpClient

Thank you in advance for your attention. I'm having trouble popularizing an object list returned from an API in Angular 7. My service class is returning service data, however I can not popular in my object list (returned from service). Below...
asked by 04.12.2018 / 03:05
0
answers

AngularJS custom service does not work

I'm new to AngularJS and I'm trying to make a simple CRUD. I'm trying to pass data from one screen to another using a service, but it does not work and I can not figure out why. Follow my code. Follow my code var app = angular.module("app",...
asked by 27.09.2018 / 13:38
0
answers

Angular - Shared Services

When I log in, I get the authentication token. I'm using the getHeaders() function by passing the authentication token I get from the backend as a parameter to insert it in header .    shared.service.ts import { Injectable } f...
asked by 22.05.2018 / 19:26
0
answers

server does not return data that I send with angular2

the component code onSubmit(form){ var success = false; var error = false; this.http.post('http://localhost/api/', JSON.stringify(form.value)) .map(res => res) .subscribe(dados => console.log(dados)); }...
asked by 19.06.2017 / 21:31
1
answer

How to ensure that a function that depends on ngOnInit runs after it?

I have a class that when initialized retrieves data from a service and popular one of its attributes, which is an array . This class has a function that sorts this array , filters and returns the result. When instantiating an object of this...
asked by 06.02.2017 / 19:15
1
answer

Display results of a search in the same View AngularJS

I'm developing an app to be able to study, and I was putting everything in the controller, all the queries and everything. But after that I decided to move everything to a service (I saw that it is correct to do so), but when I went through the...
asked by 23.08.2016 / 03:03
0
answers

Using angular and ionic, how do I traverse a vector by adding a variable of an object?

I have a vector of objects with prices, product name ..., after the customer has clicked on a product I move it to another list, from ordering, after being done this needs to cause me to add the prices of list products and return me a total each...
asked by 13.04.2016 / 16:14
1
answer

Error making REST call with AngularJS

I'm using $ http from angular to make REST calls on my server, however I'm having a problem: In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. I have tried several...
asked by 23.02.2016 / 13:17
1
answer

Send image via POST to angularjs

HELP. I'm trying to send an image to a web service via POST. in postman I tested it and it worked InmycontrollerIdidso$scope.upload=function(files){varfd=newFormData();fd.append('imagem',files[0]);midanaAPI.cadastrarImagem(fd).success(function(...
asked by 07.03.2017 / 22:21