Posts by Norbor Illig • 354 points
10 posts
-
3
votes1
answer311
viewsA: Dynamically populate a databind
Create a function in your service to calculate the total and use within your controller as follows: var app = angular.module('app', []); app.service('carrinhoService', function () { var produtos = […
angularjsanswered Norbor Illig 354 -
0
votes2
answers1891
viewsA: Upload with $http post
There are several angular ready libraries for this, among them: https://github.com/nervgh/angular-file-upload/ https://github.com/leon/angular-upload https://github.com/uor/angular-file…
-
2
votes1
answer426
viewsA: When to Use Factory Angularjs
Using Factory is one of the ways to create services with Angularjs. In addition to Factory, you can use service and Provider. The three variants have significant…
angularjsanswered Norbor Illig 354 -
0
votes4
answers12782
viewsA: Validation of CNPJ with Angularjs
Have you tried using ngPattern(https://docs.angularjs.org/api/ng/directive/input), deta forma? <input ng-pattern="/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/" id="input-cnpj" name="cnpj" id="cnpj"…
-
1
votes2
answers325
viewsA: Controller runs every time I change route
Really the way it was implemented each time the 'Dashboard' state is triggered the two controllers will be created again. If your idea is to leave the 'sidebar-left' always present, you can use the…
angularjsanswered Norbor Illig 354 -
1
votes1
answer1011
viewsA: How to use an ng-class in the <html> tag
Translating from the Angularjs documentation(https://docs.angularjs.org/api/ng/directive/ngClass) The ngClass directive allows you to dynamically change the CSS of an HTML element by making a…
-
2
votes1
answer953
viewsA: How do I add an animation while loading a request?
Assuming you are using Angularjs, follow this example: app js. app.config(['$httpProvider', function ($httpProvider) { // Criando um interceptador de chamadas http. // O '$q' é um serviço que…
angularjsanswered Norbor Illig 354 -
6
votes1
answer32691
viewsA: How to work with ui-Mask in Angularjs input
Looking through your comment, if the first tag <input ng-model="data.cnpj" type="text" ui-mask="999.999.999-99" ng-pattern="/^[0-9]{1,7}[-\.\/]?+$/"> worked, change the second to <input…
angularjsanswered Norbor Illig 354 -
4
votes1
answer463
viewsA: Doubt modifying HTML tags with Angularjs
You can create your own directive for this. See the angular documentation(https://docs.angularjs.org/guide/directive), the following section 'Creating a Directive that Manipulates the DOM' This…
-
1
votes1
answer597
viewsA: Angular + Requirejs
I suggest you use angularAMD (https://github.com/marcoslin/angularAMD) and follow the tutorial contained there. Anyway, try to do as follows (I did running may contain some bugs): main.js…