Questions tagged as 'angular'

2
answers

ERROR TypeError: Can not read property 'push' of null

I'm trying to push to a list and the following error is occurring: ERROR TypeError: Cannot read property 'push' of null at ProjectService.webpackJsonp.../../../../../src/app/projects/shared/project.service.ts.ProjectService.createItem (pro...
asked by 11.07.2017 / 17:01
3
answers

How to do a push array on an object inside another object

I have an array of objects and I'm not able to push a given object, eg I want to give a push in the id2 title but nothing I did worked out, follow the structure of the array if someone knows how to thank Objt = [{ titulo1: [ {...
asked by 17.03.2018 / 20:31
3
answers

Click function and block inputs

Good morning !! I need to know how I do when I click a button, it will be able to block (disabled) all the inputs or selects I want, basically, maybe * ngIf can do this, but not I know how it's yet Here is the code for the button and select: &...
asked by 19.06.2018 / 15:26
1
answer

Is there any difference between ng-if and * ngIf

What is the difference between ng-if and
asked by 01.03.2018 / 17:07
1
answer

Reorganize index from my array

I have two cards in my application. The first card has index 0, the second card has index 1. There is a variable called listAtributos that has the following structure: 0: {indexvariacaoatributo: 0, id: 5, tipovariacao: "Cor", valo...
asked by 09.11.2018 / 16:06
3
answers

How to concatenate an object with a variable to be dynamic?

I have an angular problem I have my object user = {name: 'Alexandre', email: '[email protected]'} I need a way to show on the console var attr = 'name'; var attr2 = 'email'; insira o código aqui console.log(use...
asked by 26.10.2017 / 22:21
2
answers

How to get a Promise value in JavaScript / TypeScript?

I'm starting with Ionic 2, which uses Angular 2, and I'm trying to understand how promises work, since some libs I'm using work have functions that return promises and would like to get the value returned, but the return is always undefined :...
asked by 06.06.2016 / 21:17
3
answers

Customized Validator 2/4

I am trying to implement a custom validator (cpf and cnpj) on an angular project using FormBuilder, but when testing the validator, it can not get the value of the field. I created the validator as follows (I am testing only, so the final log...
asked by 03.10.2018 / 15:57
1
answer

Type an array of type any [] in angular 6

I need to type an object, so I do not get any [] in the agile 6. Well, on the get, I get this from the API: { "error": false, "itens": [ [ { "operatorId": "819ee9cc-70b6-44dc-b9e8-afff8705142c",...
asked by 06.07.2018 / 15:50
1
answer

Can not bind to 'ngModel' since it is not a known property of 'input'

I am with [(ngModel)]="cliente.nome" this code is generating the error of: Can't bind to 'ngModel' since it isn't a known property of 'input'. ("="col-md-4 control-label" for="idNome">Nome: </label> And I already put the For...
asked by 02.12.2017 / 22:44