Questions tagged as 'typescript'

3
answers

how to send the CPF number without the dots and dash (Input Mask)

I'm creating a mask with inputMask , but the CPF is sent like this: 222.222.488-19 . And I want it to have the mask of input but at the time of sending it will be without the dots and dash. Type this 22222248819 . My...
asked by 22.11.2018 / 01:14
1
answer

Validate CPF in Angular 5 [duplicate]

Expensive, I would like to know how I can validate CPF in angle 5, I have already done several searches but so far nothing. I've already been able to perform email validation. Could you help me?     
asked by 05.10.2018 / 18:50
1
answer

Make reactive validation at angular with formgroup

I'm trying to put an error message in the template, but I'm not able to get into the validator I created. This is the validator: criarFormularioDeUsuario() { this.formularioLogin = this.fb.group({ email: ['', Validators.compose(...
asked by 18.12.2018 / 17:46
1
answer

Form validation with angle 6

I have this form, very simple, with only one field and one button. I gave a required input, and when I write with the empty field and / or null, it does not record (correct), but it already changes to the list screen. That would be correct, if y...
asked by 26.07.2018 / 18:29
2
answers

How to write to the mongodb API

I have this API (Controller) [Produces("application/json")] [Route("api/[controller]")] public class TypesFieldsController : Controller { private IAddTypeFieldService addTypeFieldService; public TypesFieldsController(IAddTypeF...
asked by 16.07.2018 / 15:43
2
answers

error: Uncaught (in promise): Error: Value must be an array in multiple-selection mode

Doing a compareWith, for the purpose of when I edit, the dropdowns may already be filled with the assigned values. By doing this, I get this error:    Uncaught (in promise): Error: Value must be an array in   multiple-selection mode. I ho...
asked by 01.08.2018 / 21:27
1
answer

How to sort an array of objects using TypeScript?

I have the following array : public arr = [ { id: 1, name: 'João das Neves'}, { id: 2, name: 'Areia Stark'}, { id: 3, name: 'Sonsa Stark'} ]; I would like to sort this array by the name attribute, thus: public a...
asked by 01.11.2017 / 13:09
2
answers

Open app google maps via link by ionic 3

I need to make a link that opens google maps external app on android and ios (apple maps) that opens with a marker in a certain coordinate. So far, through the research I found something similar to the one presented here: iOS (launching Apple...
asked by 23.10.2017 / 15:50
3
answers

Typescript conditions

I'm trying to make a if in typescript but it's simply ignored and never goes into condition. My typescript code: import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; @Component(...
asked by 15.10.2017 / 18:28
1
answer

'Uncaught ReferenceError: floor is not defined' when trying to use floor and random to randomly pick an item from an array

I have the following array: var cartasViradas=[ 'assets/img/1.png', 'assets/img/2.png', 'assets/img/3.png', 'assets/img/4.png', 'assets/img/5.png', 'assets/img/6.png', 'assets/img/7.png', 'assets/img/8.png',...
asked by 14.10.2017 / 20:39