Questions tagged as 'angularjs'

1
answer

How to use Named Parameters in $ http of AngularJs?

Is there any way to use named parameters in the $http of Angular method? With ngResource you can do this: var User = $resource('/path/to/user/:id'); $scope.user = User.get({id: 1}, function() { $scope.user.name = $sc...
asked by 06.11.2014 / 22:52
2
answers

Rescue 2 arrays with angularjs

angular query app.controller('recipedetails', function($rootScope, $routeParams, $http) { $http.get('app/querys/receita_item.php?id='+$routeParams.id).success(function(data) { $rootScope.recipedetails = data; console.log(data); }); });...
asked by 05.11.2014 / 04:14
1
answer

ng-switch + function

Good afternoon, I am trying to use ng-switch to show a value that depends on a condition that is in a function, but I can only pass fixed values to the field, the function with if does not seem to pass the value , if not clear, fol...
asked by 15.09.2014 / 22:33
2
answers

Accentuation + $ http.get

I'm having trouble making an Ajax call using AngularJS because the strings that have accents are returning null, as a response to the call, my PHP is returning a JSON json_encode($data) , and upon receiving the answer I'm transforming JSON...
asked by 30.01.2014 / 16:05
2
answers

Does not pull the given Array value

I have a small problem with AngularJS I need to pull the array values angular.module('app', []) .controller('Ctrl', ['$scope', function($scope) { $scope.data = [{ a: 1, b: 2, c: [{ d: "z", e: "4" },{ d:...
asked by 25.09.2014 / 17:13
1
answer

Background image dynamically

I have a list of products by clicking on some of them, redirects to another page showing just the content of that item. I get the Image, but I would like it to be as a background, ie: it will show the same image in full size, and with text and e...
asked by 28.08.2018 / 19:52
1
answer

separating information that is in string type in AngularJS

I have the following code: app.controller("LoginCtrl", function ($scope, LoginAPI) { $scope.doLogin = function (model) { if (model.username === undefined || model.password === undefined) { return false; }...
asked by 13.03.2017 / 19:18
1
answer

Upload image without extension in webapp

I have a webapp made in Angularjs and Ionic. At some point I upload images from a webservice, however these images do not have extension, being something of the type, link . When I run the app in the browser, the image loads normal, however wh...
asked by 15.03.2016 / 14:26
1
answer

Email is not appearing in the field due to Angular

Good afternoon guys, I have an app, which, after the registration made it goes to the login screen. However, the email does not appear in the form as it should. login controller: .controller('loginCtrl', function ($scope, $http, $state,...
asked by 15.04.2016 / 21:05
1
answer

test filter scenario

I would like to know the best way to test (with jasmine) a filter with this scenario: function districtFilter(city, array) { var districtFound = array.filter(function(a) { return a.id !== city.id; }); return districtFound;...
asked by 13.04.2018 / 15:55