Questions tagged as 'angularjs'

3
answers

How to select the content of an input in ng-focus?

In an input I have a method that selects the contents of the field when clicking on it. <input ng-click="selecionaTudo($event)"> The function is this: $scope.selecionaTudo= function($event){ $event.target.select(); } It wo...
asked by 23.03.2016 / 13:08
2
answers

Transferring values from one page to another with angularjs [duplicate]

Good afternoon, I wanted to know if I would be able to pass the data from one page to another ... I did a small function that when I press the button it changes the name, only that it appears on one page in the other it does not receive change...
asked by 20.12.2016 / 22:17
1
answer

How to pass parameters by providers AngularJS?

I have the default site routes in constant : app.constant('defaultRoutes', { home: { url: '/home', templateUrl: 'templates/home.html', controller: 'HomeController' }, [...demais rotas....] }); I am c...
asked by 16.04.2014 / 14:28
2
answers

How to use variable in more than one controller in AngularJS

I need to use a variable, in the angular, that I can use in more than one controller. Yes the controllers are in the same file. How can I do this? .controller('denResCtrl', function($scope, $window, $http) { $scope.fazerDenuncia = function (d...
asked by 24.03.2016 / 19:26
3
answers

return does not work inside forEach

I have the following code snippet, which is executed when trying to insert an item in $scope.items{} : $scope.items.forEach(function(item, i){ if(item.codigo == $('#codigo').val()){ item.quantidade = parseInt(item.quantidade)...
asked by 03.08.2017 / 18:35
4
answers

How to mount buttons with Angular?

I have to mount three buttons and validate them in the angle, following the scheme:     
asked by 10.02.2017 / 13:44
3
answers

Change object value

I have an array with objects similar to this: [{ name: '2015', data: [...] color: 'orange' }, { name: '2016', data: [...] color: 'red' } ] I would like to change the value of na...
asked by 01.11.2016 / 13:57
1
answer

AngularJS is not working

Why sometimes, when we call the angular, it does not work? See my HTML <!DOCTYPE html> <html ng-app='weset'> <head> <title>WESET</title> <meta charset="utf-8"> <script src="https://ajax.googleapis.com/aj...
asked by 23.02.2017 / 13:23
2
answers

AngularJS - Is a service not "static"?

Based on the idea that services are singletons ( All Services are singletons ), if I create a simple service with "local" variables and modify this in a controller, when accessing this value in another controller, it should keep the value, righ...
asked by 11.11.2015 / 14:57
3
answers

How to use grid with ng-repeat in angularjs?

I have a mobile app I want ng-repeat to create the content in a grid like I have in the example below but always repeat this as an example below: <div class="row responsive-md"> <div class="col"> <a hr...
asked by 21.10.2015 / 18:46