Most voted "angularjs" questions
This tag should be used when the question refers to some resource, information or problem related to the Angularjs framework. If so, only about Angular, there is a specific tag for this. Angularjs is an open-source Javascript framework. Its purpose is to facilitate the creation of browser-based applications in the Model-View-Controller (MVC) model, reducing the amount of code needed to create functional web applications.
Learn more…2,494 questions
Sort by count of
-
83
votes4
answers42074
viewsWhat are the main differences between jQuery and Angularjs?
I am noticing the adhesion of Angularjs and the abandonment of jQuery by some developers, however I do not know the advantages of Angularjs because I have never worked with this framework. Since…
-
16
votes3
answers40219
viewsHow to format a date in 'dd/MM/yyyy' format?
How to get a formatted string from an object of type Date in format dd/MM/yyyy?
-
16
votes1
answer1408
viewsPick width child element in Angular directive
Next I have a table fed by a simple routine. I need to make the scroll to tbody fixed. So far so good. I could do N shapes. To try to make the table responsive I am using a directive to calculate…
-
16
votes3
answers1408
viewsWhat are the differences between the forms of dependency injection?
Considering the injection of dependencies into Angularjs, there are some ways to do it. The modes as far as I know are: Form 1: angular .module('meuModulo', []) .controller('MeuController',…
-
14
votes4
answers7972
viewsHow can I make a copy of an array without reference?
I would like to know how to make a copy of an array without reference. Example of what I would like to do: var a = [1,2,3,4]; var b = a; a[0] = 3; b[0] = "nao me copie!" console.log(a[0]) //mostrar…
-
14
votes4
answers2450
viewsWhat is the :: (two-point double) in Angularjs?
I saw that in some OS question in English an Angularjs code that was using double-points before the variable. Example: {{ ::nome_variavel }} The usual is: {{ nome_variavel }} What is the difference…
-
13
votes2
answers7111
viewsHow do I pass a parameter to another Scope with Angularjs?
I have a screen that contains a list of information, when clicking on some item I can get his number, for example: Item 5 of array. The problem is that on another screen I need to display the…
angularjsasked 9 years, 9 months ago Claudia Mardegan 357 -
13
votes3
answers4688
viewsWhat is the difference between Function() {} and () => {}? Why doesn’t $http.get work?
When I use $http.get('/products').then((response) => { this.products = response.data; this.allProducts = response.data; }); the page is loaded with the products in Google Chrome, but when I use…
-
13
votes3
answers1372
viewsWhat is "Object-oriented" and what other methods?
I work a lot in AngularJS (Javascript) and with version 2.0 knocking on the door, which will have as main change the use of ECMAS6 I read a lot about Object-Oriented Programming. If you can keep the…
-
13
votes1
answer1552
viewsHow do the Angularjs Watchers work?
In Angularjs, there is the two-way data Binding, which causes the values to be displayed immediately on views even when this value is updated in controller. In addition there is also the function…
-
11
votes1
answer7086
viewsWhat is the difference between Factory, service or controller in Angular?
Next, in practice, what’s the difference and how to do service with . service, . Factory and controller? service js. angular.module('app.services', []) .factory('BlankFactory', [function(){ }])…
angularjsasked 8 years, 10 months ago GustavoSevero 2,567 -
11
votes1
answer1726
viewsWhat is reactivity in Javascript?
I see in frameworks as Angular, Vue, React, the concept of reactivity. I’m totally naive on the subject, and as far as I know, the concept of reactive programming is basically performing…
-
10
votes2
answers2720
viewsView control via authorization with Angularjs + Webapi
I am working on an application built with Angularjs and ASP.NET Web API. For now, using ASP.NET Identity I have already been able to implement authentication and authorization in the API using Oauth…
-
10
votes3
answers387
viewsHow does semantics/indexing work with Angularjs?
I always wonder, Angularjs is a framework that is being used constantly. But I have a question about how it works for the crawlers (googlebot example). They even run the javascript and interpret the…
-
10
votes1
answer1527
viewsDifferences between Success and Then Angularjs
So far I’ve been using the success to the Http Promises. Ex: $http.get(/url).success(function(data){ console.log("Sucesso"); }) .error(function(response, status) { console.log("erro " + status); });…
-
10
votes2
answers1644
viewsWhy use the Angularjs?
I have done a lot of research, but I can’t understand why I use Angularjs, using pages .php then bank returns, CRUD and etc. I deal directly on the pages .php, lists of bank records, insertion and…
-
9
votes2
answers1137
viewsHow to use a module in Angularjs?
I have the following code in Angularjs but I have the error: Error: [$injector:unpr] Unknown Provider: Authenticationprovider <- Authentication My code is this: app js. angular.module('app')…
-
9
votes1
answer1585
viewsWhat is the difference between Knockoutjs and Angularjs/Emberjs?
What’s the difference between Knockoutjs and Angularjs/Emberjs? What I’ve been researching: Apparently Knockoutjs has a much smaller learning curve, can be integrated into existing static sites and…
-
9
votes3
answers1392
viewsHow to integrate Angularjs with common scripts?
My doubt started when I tried to use the Carousel twitter bootstrap inside an Angularjs project, it didn’t work at all. I found the angular-ui, solved my problem using this component, but my doubts…
-
9
votes2
answers879
viewsRecover Error messages via json in Angular
I’m trying to register using Angularjs, but I want to get the validations that are in my model in Rails. But I’m having difficulties: Covenat(model) Rails validates :name, presence: true controller…
-
9
votes2
answers217
viewsUsing Jquery Library with Angularamd
I am implementing Angularjs + Requirejs through Angularamd. I want to add the Jquery library but returns the following error when using the "$": Error: $ is not defined I have the main.js configured…
-
9
votes1
answer1403
viewsSave image link as file in Storage location
How can I save a link (http://example.com/img.png) in the file format, which in this case is . png, using Javascript and saving in the local $localStorage angularjs?…
-
9
votes2
answers8501
viewsSynchronous requests
I need to make requisitions, but the first must be a GET (getByNome) and then run the rest because they depend on it. It turns out my code is sending a Undefined because the requisitions depend on…
-
9
votes2
answers2120
viewsWhat’s the difference between "this" and "$Scope"?
In the AngularJS we use $scope to share information between the domains of a controller. There is also the syntax Controller as which allows us to use the this to the same end. With $scope: function…
-
8
votes3
answers516
viewsClient router vs server router?
What is the advantage and disadvantage of routes being made by server(php,Asp.net, etc.) or by client(Angularjs,emberjs,backbone...) ? In terms of performance, which has the most? Security, mobile,…
-
8
votes1
answer1309
viewsWork with Angularjs in master page Asp.net
I’m involved with the Angularjs these days, so in this learning phase, I came up with a question. How I work with Angularjs on Asp.net pages that have a master page? For example, I realized that the…
-
8
votes1
answer32691
viewsHow to work with ui-Mask in Angularjs input
<form name="myForm" ng-submit="addState(myForm.$valid)" novalidate > <input ng-model="data.cnpj" type="number" ui-mask="999.999.999-99" placeholder="CNPJ" required ng-minlength="6"…
angularjsasked 9 years, 10 months ago Claudia Mardegan 357 -
8
votes2
answers608
viewsHow to hide Keyboard in Cordova by pressing "Go" or "Done"
I have a form in my app, and I would like that after filling, if the person pressed Ir or Done, the keyboard would disappear. Has anyone ever been there? Or knows how to solve?…
-
8
votes2
answers7334
viewsHow to redirect page in Angular?
After finishing the data update, I want the system to redirect the user to another page. I am using ui-router and I was told to use $state.go. But how do I use this command? Follows my code:…
-
8
votes2
answers678
viewsMixing Javascript libraries in a project
I wonder if it is not good practice to load several different Javascript libraries in one application. For example, the project has an X deadline for delivery, but should be done in Angularjs but…
-
8
votes2
answers2062
viewsWhat is the difference between angular.extend and angular.merge?
At the angle, to extend an object, I usually use `angular.exted var obj = {nome: "wallace"} angular.extend(obj, {idade: 26}) Upshot: Object {nome: "wallace", idade: 26} However, I realized that by…
angularjsasked 8 years, 1 month ago Wallace Maxters 102,340 -
8
votes2
answers1098
viewsAngular POST with custom header and CORS
I need to perform a POST request using angular (http.post) and I need to pass to my API (.NET) in my header the access credentials (I’m using basic Authentication). Authorization:Basic…
c# angularjs asp.net-web-api http-headers cross-domainasked 9 years, 1 month ago Pedro Camara Junior 6,637 -
8
votes5
answers3991
viewsUpdate list after push Angularjs
I have a list with several data ($scope.messages), but only some data interest me. After loading this list I make a foreach and take only the data that interests me and give push in a new list. That…
-
8
votes1
answer2408
viewsWhat does the MVW of Angularjs mean?
When Google searches for Angular, it is returned: Angularjs - Superheroic Javascript MVW Framework I know that MVC means Model-View-Controller but what is the W of MVW Framework? Is this a new…
-
8
votes4
answers256
viewsWhat’s the difference between creating a module normally and creating a module within a function?
I’ve been looking at some sample projects in Angularjs and came across several times the following code: (function () { angular.module('meuModulo', [ 'alguma.dependencia', 'outra.dependencia' ]);…
-
8
votes1
answer719
viewsWhat is the difference between "=" and "<" in the "Scope" options of a customised directive?
In Angularjs, I was creating a directive. I realized that by using the sign = to capture a certain controller scope value, when I changed this value, the parent controller value was also being…
-
8
votes1
answer154
viewsDoubt with ng-repeat
I have the following code: <div id="box-1" class="box"> <div ng-repeat="task in contato " style="margin-top: 5px"> <div class="md-card md-card-hover"> <div…
-
8
votes3
answers1569
viewsForm completion with return of a json
I am using a webservice (viaCep) for automatic filling of the backyard, for when the user type a zip code. The webservice returns me a json with the information from the patio, and from that return…
-
7
votes1
answer226
viewsServer Side rendering need for javascript content - Angularjs
Knowing that from this year google Crawler performs javascript, considering the indexing of a content that is displayed using Angularjs, there is still the need for a version of the same content…
-
7
votes2
answers1242
viewsHow to organize the codes in Angularjs?
I have several modules with Angularjs angular.module('modulo1', ['ngTable']); angular.module('modulo2', ['ngTable']); angular.module('modulo3', ['ngTable']); window.app = angular.module("app",…
-
7
votes2
answers1770
viewsObject filter disregarding accents in Angularjs with Ionic
Fala galera, I’d like to do a filter on the Angularjs that overlooks the accents. This filter is applied on top of a list of objects that have a name property for example that we filter on top of…
-
7
votes6
answers17707
viewsHow to validate date with Angularjs or jQuery?
I have a simple input that gets a date, how to validate that date if it is true? For example: 31/02/2006 this does not exist 20/20/9999 this does not exist <input name="data" ui-mask="99/99/9999"…
-
7
votes1
answer2480
viewsLoad list by parts using Angularjs
I want to return a query using Angularjs and, when presenting on the screen using a ng-Repeat, display only the first 10 records, and add 5 out of 5 records using the scrollbar* or just by clicking…
angularjsasked 9 years ago Arthur Gonçalves 110 -
7
votes1
answer130
viewsMake a " or " inside the key of an attribute in JS
I have the following code: scope.cm = 1; scope.mm = 2; scope.km = 3; tipoDeMedida[scope.cm || scope.mm || scope.km] = function(arrayQualquer){ //executo meu bloco de código X. }…
-
7
votes2
answers2370
viewsWhat is the difference between directives (Directive) and components (Component)?
It seems that in more recent versions, in addition to the method directive, Angular 1 also has a method called component. I would like to understand the main differences between one and the other.…
angularjsasked 7 years, 8 months ago Wallace Maxters 102,340 -
7
votes1
answer8172
viewsHow to catch setar/catch object in localstorage?
I’m sending a JSON object to localStorage: window.localStorage.setItem('tarefa',aux); And I try to get this object in another controller like this:…
-
7
votes2
answers293
viewsHow to destroy a $Scope. $watch?
I have the following $scope.$watch in the controller of a directive I created: var interval; $scope.$watch('active', function () { if ($scope.active == true) { interval = $interval(function () { if…
angularjsasked 8 years ago Wallace Maxters 102,340 -
7
votes2
answers2154
viewsHow do I convert a date into American format in Angular?
I’m using a Json No Laravel 5 response, where I use Angular to display this data. The date in Laravel is returned in format 2017-05-17 15:56:46. When trying to use filter date at the angle,…
-
7
votes3
answers1044
viewsHow to edit and load class only for a single element
I have the following HTML structure below. However, when clicking on one of the "items" the class (editing) is displayed for both elements. What should I do to make it happen only in the clicked…
angularjsasked 7 years, 6 months ago lucasbento 856 -
7
votes2
answers3051
viewsOpen link in a new tab without target or window.open
I have a function that does a redirect: vm.pagarUpload = function() { $http({ method: 'POST', url: API.url + 'app/service.php?t=pagarUpload', data: { nome: vm.nomeUpload, email: vm.emailUpload, cpf:…