Questions tagged as 'typescript'

1
answer

How to break lines according to a value

How do I break lines by value? For example a = 8. Then I have a "d" variable that receives a string. var d="written work considered in its original wording". If I put an If = a; it traverses the string by always counting q for 8 characters it br...
asked by 30.09.2018 / 23:58
2
answers

How to validate e-mail and CPF in angular 5?

Expensive, I would like to know how I can validate the e-mail and CPF in angular 5. I made the basic code: <mat-form-field class="full-width"> <input matInput placeholder="E-mail" [formControl]="emailFormControl" [(ngModel)]="e...
asked by 02.10.2018 / 21:02
1
answer

Search Array with variable case-insensitive javascript

I need to search an array with values of type: equipamentos = [{marca: 'Nomedamarca1', modelo: 'Modelo1'}, {marca: 'Nomedamarca2', modelo: 'Modelo2'}, {marca: 'AlgumNomeComCase', modelo: 'Modelo3'},...
asked by 26.06.2018 / 17:00
1
answer

POST Method in Angular

I have a simple application in Angular and I need to call my API to get a token . But I am facing difficulties. I'll try to explain a bit about my flow. I created a service class where I instantiate it only once to store a Token. This token...
asked by 11.06.2018 / 13:46
1
answer

Select array to save

asked by 03.09.2018 / 16:38
1
answer

Visual Studio Error - Can not find name 'Record'

I'm working on an ASP.NET project with C # in Visual Studio 2015 and I came across error in the index.d.ts file. The error messages are Cannot find name 'Record' and Cannot find name 'undefined' . I saw that there would be so...
asked by 03.01.2018 / 17:49
1
answer

The use and non-use of the word function in TypeScript

Why when declare method in a class the compiler beeps, stating that the use of the word function is wrong. In previous lessons from my learning to create a function, I first signed it as function . abstract class Empregado {...
asked by 22.05.2018 / 20:33
1
answer

Type never - TypeScript

Today I was asked what type never is for TypeScript, but it was confusing for me, is it just to say that it does not return anything? What's the difference to void ?     
asked by 18.05.2018 / 14:17
1
answer

TypeScript supports an equivalent implementation of trait?

I'm developing a project using Ionic, and would like to better organize my classes. Below is an example of how I would do with PHP: <?php trait comportamento { public function ficarTriste() { } public functi...
asked by 27.06.2017 / 21:29
1
answer

FirebaseListObservable transforms into Object Array

I'm using Ng2-Smart-Table, according to the documentation it accepts an array of objects to mount the table: No HTML: <ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table> In Javascript import { NgxData...
asked by 31.05.2017 / 14:04