Questions tagged as 'typescript'

1
answer

How do I receive a post or get request with typescript?

I'm starting with nodejs now and would like to use typescript to program compiling for pure javascript. So I'm having trouble finding something succinct so I can understand (since I'm a PHP programmer) how to receive post and get requests. For e...
asked by 20.11.2017 / 01:03
1
answer

Center div content in AlertController

I have the following code below let alert = this.alertCtrl.create({ message: '<div><img height="50" src="assets/imgs/success.png"></div><div>' + '<p>Cadastrado com sucesso!!!</p>' + '</div>',...
asked by 05.12.2017 / 17:15
2
answers

I can not print the object's attribute in the log

Well, I have a class: export class Usuario{ private id : string; private bluetoothMAC: string; private cpf: string; private nome: string; private oficinaVisitadas: Oficina[]; private cacheMAC: Mac[]; private saidaMAC: Mac[]; constructor(){...
asked by 15.08.2017 / 15:27
1
answer

print EventEmitter data in angular 2

I'm not sure what to do, The code for the app.component import { Component} from '@angular/core'; import { AuthService } from './login/auth.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['....
asked by 21.06.2017 / 15:46
1
answer

List data from Json with Angular 2

Considering that I have a Json coming from a Url (' link '). I created a service to get this object: import { Injectable } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; @Injectable() export class Plano...
asked by 17.07.2017 / 21:54
1
answer

Property forChild does not exist on type typeof IonicModule Ionic 2

I've created a new ionic project 2: ionic start myApp blank --V2 Until then, only when I create a new page: ionic g page login It is giving the following error below: Typescript Error Property 'forChild' does not exist on type 'type...
asked by 14.04.2017 / 05:00
1
answer

Sum of select values entered in the input

I'm giving a practiced ionic 2, I'm building a basic app for this, with some interesting functions to study. I want the user to select two "ion-options" from two different ion-selects, these results (in numbers) are summed and shown in the "i...
asked by 11.05.2017 / 21:48
1
answer

Component is printed 2 times in browser

Well guys, I'm developing an app with angular2 final version using routes. I created some files and then came across a route problem. My component Home is printed 2 times in the browser. IntheFirebugConsole: Follow the code...
asked by 21.09.2016 / 00:13
1
answer

Detecting change of ion-textarea with ionic2

I'm developing an app and I needed to detect the ionChange or keyUp of an ion-textarea in ionic 2. Below are examples that work.    my-file.ts atualizar() { console.log('Atualizou :)'); }    My .html <!-- FUNCIONA --> <i...
asked by 21.08.2016 / 04:35
2
answers

Add methods to Date using typescript

I'm trying to create a method to format the date. Something like var minhaData = new Date(); console.log(minhaData.format('[d]/[m]/[Y]')); I searched the internet and managed to develop this section: interface Date{ format(formato:str...
asked by 11.02.2016 / 12:13