Questions tagged as 'typescript'

1
answer

TypeScript - Error: Debug Failure. False expression:

I'm trying to create a Node.js module definition. I have the file poolredis.ts , but when I add the line: import { RedisClient } from 'redis'; The TypeScript compiler gives me the error:    Error: Debug Failure. False expression:...
asked by 04.01.2017 / 19:40
0
answers

Facebook page does not open with click - nightwatch

Hello, I recently started working with Nightwatch.js . I want to test the click on the facebook icon. The code is this: module.exports = { "Facebook link" : function (browser) { browser .url(http://m.uni...
asked by 12.05.2016 / 12:50
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
2
answers

Register in the bank a separate array

I have a API in PHP and an app I'm getting a string like this from the app " 200,300,40 " and the same thing " polimento,pintura,lavagem " from the app. I would like to know how to register each number and name of that sep...
asked by 17.04.2018 / 20:51
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
1
answer

Doubt about the map function

I have this object { "alunos": [ { "aluno": { "id": 1, "nome": "Genevieve Sipes", "status": "Ativo" }, "mensalidade": { "status...
asked by 28.01.2018 / 20:37
1
answer

Turn html page id inside ngFor to page ts

I have an * ngFor of an array object, I want to pass the id inside the button to the typescript for configuralos as links in a modal. Here is the syntax that I'm trying with no success: <ion-item *ngFor="let item of itens"> <ion-t...
asked by 26.01.2017 / 22:37