Posts by Arnaldo R. Portela • 375 points
18 posts
-
0
votes1
answer38
viewsA: Problem implementing Angular editing
According to the image provided, it seems that your html (Edit.component.html) is with the default html that the angular created.
angularanswered Arnaldo R. Portela 375 -
3
votes2
answers52
viewsA: Problems with Javascript
In the last method, within the for you are not declaring the variable i. Change this: for (var = 1; i <= 12; i++){ therefore: for (var i = 1; i <= 12; i++){…
javascriptanswered Arnaldo R. Portela 375 -
0
votes2
answers86
viewsA: How to select only the class without the daughter class in pure javascript
You can use the pseudo selector :not(), in your case, not to select the class .loading you can use this selector: .modal:not(.loading){ }
javascriptanswered Arnaldo R. Portela 375 -
0
votes1
answer651
viewsA: How to compile a list with data from an Observable?
You can make the iteration by signing up for the Observable response so: export interface Pessoa { nome: string; cidade: string; } export MyClass { list_pessoa: Pessoa[] = []; pessoa:…
-
0
votes4
answers1899
viewsA: Insert comma automatically while typing
You can use Jquery.Mask and pass the format you want, example: $('.classeNoInput').mask("#.##0,00", {reverse: true}); Follows the documentation link This solution serves other formats as well as…
-
1
votes1
answer318
viewsA: carry data to another page
You can transport the information between pages using both sessionStorage as localStorage, but both have different behaviors. The sessionStorage keeps the information while the browser tab/window…
-
0
votes1
answer307
viewsA: Is it possible to create a JS file for all pages?
If the code in the JS file is common to more than one page, you can certainly reuse it, not only can it but it should, after all this is one of the main advantages of separating javascript code into…
-
0
votes1
answer399
viewsA: How to recover an angled Base64 image on the server
The problem is that the image, when encoded for Base64, has a prefix before the string of characters that serve as metadata in the following format: "date:mimetype;Base64,characters" where:…
angularjsanswered Arnaldo R. Portela 375 -
0
votes1
answer163
viewsA: Problem at angular5 with Httpclient
You need to register the class module InvestimentosService as a Provider. Explaining: All classes using the decorator @Injectable() need to be registered in the angular providers list so that it can…
-
2
votes1
answer181
viewsA: Store incremented value within a Jquery click function
You are assigning the value "0" to the variable "page", then you are redeclareting it (I imagine here is another variable) and at the end you are incrementing it by 1. To function, your variable…
-
1
votes1
answer571
viewsA: How to use Base64 image in Angular 2?
The problem is that the image, when encoded for Base64, has a prefix before the string of characters that serve as metadata in the following format: "date:mimetype;Base64,characters" where:…
-
0
votes3
answers628
viewsA: Make html class appear and disappear by js
To add or remove classes directly by javascript you can do the following: To add document.getElementById("seu-id").classList.add("sua-classe"); To remove…
-
2
votes1
answer468
viewsA: Undefined when passing parameter to a JS and Angular function
The problem is that you are using angular, but you are recovering the value using Jquery. When $(Document). ready is fired, the value of "size" really is Undefined. My suggestion is to use the…
-
1
votes1
answer328
viewsA: How to remove column spacing in bootstrap
Your layout is popping bootstrap columns, the sum of all column sizes needs to be equal to 12, so you need to define how many columns your layout will have, if there are two columns, the composition…
-
0
votes1
answer3358
viewsA: Uncaught Referenceerror: angular is not defined
I recreated this example in plnkr and made some modifications that worked: 1 - use app.config() instead of app.route(), 2 - use $routeProvider instead of $routeprovider (note the uppercase "P") I…
angularjsanswered Arnaldo R. Portela 375 -
0
votes2
answers214
viewsA: Custom header angular 4, error does not authenticate
I recreated your example in plnkr and it worked, check on the link if my implementation is different from yours: Example link Just remember that since you are using Httpinterceptor, you should use…
angularanswered Arnaldo R. Portela 375 -
0
votes1
answer2461
viewsA: Angular 4 - Perform function only when variable is changed
You can call this method using the "change" event of the input element, so when the variable (in the case of the input content) is changed, the method is called. Ex.: <input type="text"…
-
1
votes6
answers11997
viewsA: Current date Angular 2
As their goal seems to be to compare the two dates, if both are of the Date type, there is a simple way to do this is to compare them using milliseconds ex: dataInicial.getTime() > now.getTime()…