Questions tagged as 'angular'

1
answer

CORS error when executing request using HttpClient in the Angular

I'm trying to perform an Http request using "HttpClient" from Angular 4, and I get the following error:    Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers in preflight response. According to...
asked by 08.02.2018 / 05:11
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

How to download PDF file from server on ionic 2?

I'm using the MPDF_6_0 library to generate PDFs, unitarily testing works, but I can not power it through the ionic project. How to do this? Thanks to everyone in the community. import { Injectable } from '@angular/core'; import { Http,...
asked by 14.10.2017 / 04:14
2
answers

Create menu of options

I need to make a menu of options in my application developed in ionic 2. I've already rolled the documentation and found nothing that would help me. Does anyone know how to do it? Do you have a tutorial or any reference? Thank you very much in a...
asked by 22.06.2017 / 19:08
2
answers

How to add property of Array objects in a * ngFor

I have an array passed to a * ngFor, how do I sum the values of a property, vlr, for example. order=[ {"qtd": Number(1),"vlr":Number(3.50)}, {"qtd": Number(6),"vlr":Number(4.00)}, {"qtd": Number(2),"vlr":Number(1.20)} ]; <div...
asked by 01.05.2017 / 23:16
1
answer

npm install -g angular-cli shows error

Before I was presenting a message that git could not be found, I then reinstalled, corrected PATH , but now it displays another error message, can anyone suggest me what to do? Binary is fine; exiting. C:\Users\Rafael\AppData\Roaming\np...
asked by 20.10.2016 / 22:12
1
answer

Ionic 3 LocalStorage disappearing

I have an application on Ionic 1 that saves some information on the localStorage. I rewrote the same application on Ionic 3 with the same package id (widget id in config.xml), but when installing the new application over the old one I lose the l...
asked by 20.12.2018 / 02:17
1
answer

Updating of variants OnInit - Angular 2

I have the variable: compromissoInicio = ‘’; No onInit , I have: this.enviaForm(this.funcoes.homeAtualiza); That is, if homeAtualiza is true , the system updates the information as follows: ... submita form ... thi...
asked by 05.12.2018 / 15:27
1
answer

How to convert json object to array

I'm trying to create methods to filter but from what I understand, it needs to be an array, how do I turn it into an array and access the array's methods? import { DataSource } from "@angular/cdk/collections"; import { EditoriasPage } from "./...
asked by 02.01.2019 / 20:23
1
answer

Timer with active session time: Cook time expiration time - autal moment

I'm working with Angular, and when I save the access token in a cookie, I also save (in another cookie) its expiration time (30 minutes). I want to make a timer that shows the user how long he still has to log in, but I'm having some difficultie...
asked by 02.01.2019 / 11:59