Questions tagged as 'angular'

2
answers

Validate input type="number" = 1 with Angular

I am trying to do a validation so that the value of my input type="number" seje > = 1. But I tried several things and none worked. I'm now trying to use ng-pattern. But there's a gap. If I type 0 it invalidates, but if I type 01 it validates!...
asked by 13.10.2016 / 17:00
2
answers

Add a new literal object to an array of objects!

I would like to add a new item in my array of objects through a method, but I do not know how to do it. public products: Array<Object> = [ {prodName: 'product 1', prodElement: 'element 1', prodAttribute: 'Attribute 1', attrValue: 'valu...
asked by 21.09.2018 / 18:25
1
answer

Angular ignores line break in String

I'm putting together a message with several messages in JAVA. After mounted send to the front / view however the angular is eating all breaks of lines: public String salvarPorXLS(){ while (rowIterator.hasNext()) { pErrors += "\n"+"Ativida...
asked by 18.09.2018 / 15:25
2
answers

Algorithm for calculating residential or industrial energy consumption in javascript or typescript

Hello colleagues, I'm creating a component in Angular (5+) where I need an algorithm to perform this calculation of power consumption In case the power option is selected I inform you: power Usage (h / day) Rate (R $ / kWh)...
asked by 26.06.2018 / 23:04
1
answer

Angular or Angular

I saw some questions here on the site related to this but it was more related to updating from one to the other and others were closed ... What are the main differences from one to the other? Even though it's an older version, can AngularJ...
asked by 20.06.2018 / 03:01
1
answer

How to make an RSS feed work on Angular 4?

The code below is working on a HTML page <html> <head> <title>Titulo da página</title> <meta charset="utf-8"> <script type="text/javascript">...
asked by 18.04.2018 / 19:28
2
answers

View result of forEach outside it [closed]

Is there any way the data of forEach can be viewed outside of forEach ? I need to view the forEach data outside of it, but every time I do this it only returns the last data, not all data. I've already tried using local...
asked by 20.09.2018 / 17:25
1
answer

Angular for layout creation [closed]

Good morning guys! I'm now starting to study angular, node, and typescript (not in that order) and the following questions popped up: 1- I noticed that to run the angle, usually the node is used for backend apps for example. I saw that you...
asked by 14.11.2018 / 11:08
1
answer

Overwrite the default icon of the material angular mat-stepper

I'm trying to override the default mat-stepper icon, but it does not seem to work. I followed the documentation, but my icon is next to my label, instead of overwriting and staying in the blue circle. STACKBLITZ     
asked by 03.11.2018 / 17:01
1
answer

Angular: persist return of get in function / variable

booksList: Book[]; listById(id: number): Book{ this.http.get<Book>('${url}/list/id=${id}') .subscribe((response)=> { this.book = response; console.log(this.book); //aqui existe o livro...
asked by 27.12.2018 / 14:39