Most voted "typescript" questions
Typescript is a super superset of Javascript created by Microsoft that adds optional types, classes, interfaces and modules and compiles for pure Javascript.
Learn more…1,167 questions
Sort by count of
-
1
votes1
answer167
viewsError with http.post and http.get with Angular 2
Well, I’m having a problem sending and retrieving data with Angular 2. Auth.ts import {Observable} from 'rxjs/Observable'; import {Injectable} from "angular2/core"; import {Http, Response} from…
-
1
votes1
answer1626
viewsaccess port problem in Node.js
I’m trying to learn about angular2, and I’m facing this problem. when I type : "live-server" this error appears to me below: live-server Error: listen EACCES 0.0.0.0:8080 I try to type the command…
-
1
votes1
answer143
viewsDo you use Typescript in Netbeans 8.1?
I’m using Netbeans 8.1, but it doesn’t recognize the syntax of Typescript. Is there any plug-in that works well with Typescript in Netbeans 8.1? If not, which IDE would be indicated?…
-
1
votes1
answer182
viewsDetecting ion-textarea change 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…
-
1
votes2
answers2784
viewsHow to get the return (value) of a Promise in Javascript / Typescript?
I’m starting with Ionic 2, which uses Angular 2, and I’m trying to understand how Promises work, because some libs I’m using work have functions that return Promises and would like to get the value…
-
1
votes1
answer85
viewshttp post error
Friends, I would like to have the save method in the class itself, and I’m not getting it, I’m beginner in typescript. import { Injectable } from '@angular/core'; import { Http } from…
-
1
votes1
answer126
viewsProblem with typescript + ionic2
good evening, I have the following problem. I have my project in Ionic and in it I created a folder only for models. app>model (o objetos do meu sistema) > minha-model-a.ts >…
-
1
votes2
answers308
viewsShow Map with point Ionic 2
Personal use Ionic 2 beta in a project with ts, has the coordinates of a point, I wonder how I can put the map with the current position of the user and a marker in the saved coordinates. How can I…
-
1
votes1
answer183
viewsIonic 2 - Any type variables
I’m having trouble migrating from Ionic beta.11 to RC0. Every time I put a constructor waiting for type "any" I get the following error. Ngc error: Error: Error at /Projeto/.…
-
1
votes1
answer822
viewsPass html page id inside ngFor to ts page
I have a *ngFor of an array object, I want to pass the id inside the button to typescript to configure it as links in a modal. Follow the syntax I’m trying with no success: <ion-item *ngFor="let…
-
1
votes0
answers54
views"Reference path" and "import"
/// <reference path="arquivo.ts" /> import "./arquivo.ts"; What’s the difference and when to use each in Typescript/nodejs? It is necessary to be a file ts or I can directly import a js? Have…
-
1
votes0
answers200
viewsAg-grid with Angular2 using angular-cli
I am trying to run ag-grid with angular2, the examples you have on the ag-grid website are using Systemjs as Builder, and the new angular-cli uses webpack. Below I’ll put the way I managed to run,…
-
1
votes1
answer304
viewsion-toggle how to fire event when scoring
I have following code: <ion-item *ngFor="let dispositivo of dispositivos"> <ion-label>{{dispositivo.Nome}}</ion-label> <ion-toggle toggle-class="toggle-positive"…
-
1
votes0
answers89
viewsCall test script function [Protractor]
Hello, I have a file that calls several test methods that I created with Protractor, it looks like this: import {MeuCadastro} from './MeuCadastro/MeuCadastro.spec'; import {Rotas} from…
-
1
votes1
answer156
viewsModule Ionic error 2
When I create a page the module is not being recognized, for example user page and signup in my case are not being recognized, how to solve? follows the attached image…
-
1
votes1
answer573
viewsModule.ts Ionic 2
I updated Ionic 2 and angular, but now when I run a page it automatically creates a module.ts file inside the page folder along with html, scss and ts file, does anyone know how to make the…
-
1
votes1
answer123
viewsHow to popular an Sqlite database through a . sql file?
I have a file .sql and need to run all rows, insert all records that are in it, into a table within the Sqlite. Contents of the archive mydb.sql: CREATE TABLE tblVeiculo (VeiculoId INT, Codigo…
-
1
votes0
answers96
viewsI wanted to call this function within my anonymous function, how can I do that?
retonaEndereco(myLatlng,adress => { let getDistance = function (origin,destination) { let distance = geolib.getDistance(origin,destination); return…
-
1
votes0
answers483
viewsSave value to a variable
How can I save the value of a calculation done in front-end by passing to a variable in typescript, example: Typescript: valor:number=0; html: <ion-input type="number"…
-
1
votes1
answer3148
viewsHow to use components exported from other modules at Angular 2
I’m starting to use Angular 2 and I’m having trouble accessing an existing component in a module I created. When opening the application, route root should be directed to the module IndexModule…
-
1
votes0
answers102
viewsDifferences and advantages between typescript and javascript
I would like to know the differences between typescript and javascript And what would be the advantages and disadvantages of each ...
-
1
votes0
answers83
viewsReflection with Property Developer in typescript does not work
I am trying to create a developer (Nonexportable) to inform which fields of a class should not be exported. Follow code: nonexportable-decorators.ts const NON_EXPORTABLE_KEY =…
-
1
votes1
answer583
viewsProperty forChild does not exist on type typeof Ionicmodule Ionic 2
I created a new Ionic project 2: ionic start myApp blank --V2 Until then, only when I create a new page: ionic g page login He’s making the following mistake below: Typescript Error Property…
-
1
votes1
answer121
viewsCannot find module@google/maps
I’m using the package @google/maps, installing: npm install @google/maps and npm install @types/googlemaps I made the import: import * as gmaps from '@google/maps' But I get the error Cannot find…
-
1
votes0
answers72
viewsHow to leave one or more options preselected (ion-option)
I have an array that I fill with service data from the database. And I also have a relationship table in the database between user and service. I would like to mark as selected the options that the…
-
1
votes1
answer448
viewsIonic 2, Http request only works after second call
I created an application sidemenu and a provider (conexao-home.ts). On a test page I created the function buscarUsuarios (associated with a button), calling the function getRemoteUsers in the…
-
1
votes3
answers801
viewsHow to concatenate an object with a variable to be dynamic?
Guys I have trouble in angular 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…
-
1
votes1
answer1883
viewsHow to sort an array of objects using Typescript?
I got the following array: public arr = [ { id: 1, name: 'João das Neves'}, { id: 2, name: 'Areia Stark'}, { id: 3, name: 'Sonsa Stark'} ]; I’d like to order that array by the attribute name, thus…
typescriptasked 6 years, 8 months ago viana 27,141 -
1
votes1
answer254
viewsSum of <select> values inserted in <input>
I am giving a practiced in Ionic 2, I am building a basic app for this, with some interesting functions to study. I want when the user selects two "ion-option" from two different "ion-select", these…
-
1
votes1
answer747
viewsMessage no Component Snackbar - Angular 4 Material
I’m using the library of angular material and decided to use the Component of Snackbar. One of the parameters of Snackbar is the parameter message. My intention is to pass inside the message instead…
-
1
votes1
answer739
viewsHow to 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…
-
1
votes0
answers389
viewsManipulating data in Ionic 2
I am using Ionic 2 for the development of an application, I would like to know how I can use the values sent from a form within a method. I have the following form: <form [formGroup]="updateUser"…
-
1
votes1
answer467
viewsGenerate multiple . js files with webpack
I need to create several files. js one for each file . ts, but I don’t know how to configure webpack 2 to do this procedure. var path = require('path'); var ExtractTextPlugin =…
-
1
votes1
answer325
viewsprint Eventemitter data at angular 2
personal ask me a question I researched more did not find answer yet I have an object inside a auth.service The code of the.Component app import { Component} from '@angular/core'; import {…
-
1
votes1
answer155
viewsNo "Typescript task runner" - vsCode
Below is the screen I need to find in vsCode (I need the Tasks: Configure Task Runner): But when I search for "tasks" in the command palette (Ctrl + shift + 9), this option does not appear: Can you…
-
1
votes1
answer42
viewsIs there a Collection in Typescript, for example, java?
If it does not exist, why does it not exist since the object orientation in typescript is so 'well structured''?
typescriptasked 6 years, 5 months ago Henrique N. Mendes 328 -
1
votes1
answer963
viewsAngular 2 - Changing Component Variable by Service Variable
I would like to change my Component variable through a method performed in the service. The variable appears from true to false as desired in the console.log, but is not changed in the fixed…
-
1
votes1
answer159
viewsIonic 2 and One Signal how to use the handleNotificationOpened() function
I have an app that is 90% ready, notifications are already set up with One Signal, but I want to send the user to a specific page when they click the notification, and this page may differ depending…
-
1
votes3
answers2206
viewsHow to push an object into another object
I have an array of objects and I’m not being able to push a certain object, example I want to push the titulo2 id but nothing I did worked out, follow the structure of the array if someone knows how…
-
1
votes0
answers22
viewsError sending xml data
I have this message: [{erro: "Formato de usuário inválido"}] Typescript code var headers = new Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded'); let urlSearchParams =…
-
1
votes0
answers101
viewsFunction with Enum - TYPESCRIPT
Good need to put a function in an Enum in typescript as in the example below: export enum dataTableFunc{ 'edit'= teste() } function teste(event.button){ // } In this Function that I am trying to…
-
1
votes2
answers3915
viewsERROR Typeerror: Cannot read Property 'push' of null
I am trying to push to a list and the following error is occurring: ERROR TypeError: Cannot read property 'push' of null at…
-
1
votes2
answers1376
views"checked" from "ion-radio" does not work
<ion-list radio-group style="margin-bottom:10px;" [(ngModel)]="orcamento.tipo" name="tipo" #tipo="ngModel"> <ion-item> <ion-label>Consumidor</ion-label> <ion-radio…
-
1
votes0
answers55
viewsPassing "this" to classes initialized within another class in Typescript
INTRO: I’m relatively new to Typescript (a few weeks of practice), I’m slowly learning superset and using it in conjunction with Electron. I was making a extend class Browserwindow to create extra…
-
1
votes1
answer1602
viewsList Json Data with Angular 2
whereas I have a Json coming from a Url ('https://api.site.com.br/v1/servicos'). I created a service to pick up this object: import { Injectable } from '@angular/core'; import { Http, Response,…
-
1
votes0
answers50
viewsPaged selectlist in Angular2
I have the following HTML code for the list: <select data-placeholder="Origem" id="origemNew" (click)="SelecionaOrigem($event,oportunidadeNew.operacao,true)" class="chosen-select col-md-12">…
-
1
votes0
answers43
viewsIONIC-ANGULAR Problem with: You must include credentials to use this auth method
Hello, After implementing the Login method for my application and trying to log in, an error appears: "You must include credentials to use this auth method". I’ve looked in several places, but I…
-
1
votes1
answer664
viewsReturn the firebase.auth message in typescript
I’m using Firebase in the back end of this login, but I’m not able to use the information that comes back from firebase.auth to check if it was an error or not and thus set the Autenticacao false or…
-
1
votes2
answers248
viewsI cannot print object attribute in 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:…
-
1
votes0
answers480
viewsI cannot instantiate class with parameters compiling with Aot
Versions. TUDO ATUALIZADO NA DATA DE HOJE (2017-08-23) @angular/cli: 1.3.1 node: 8.3.0 os: win32 x64 @angular/animations: 4.3.5 @angular/common: 4.3.5 @angular/compiler: 4.3.5 @angular/core: 4.3.5…