Questions tagged as 'angular'

0
answers

How to use ngIf to hide Links?

I'll tell you what I need right away, then I'll go into more detail on my problem. I need to hide this link from editing, how can I do this with ngIF? <div class="col-lg-4"> <h1>{{ title }}</h1> <div c...
asked by 06.08.2018 / 16:31
2
answers

Request http post in ionic does not send the data as x-www-form-urlencoded

I need to perform an HTTP request to log in to my ionic application, but my function needs to send the data as x-www-form-urlencoded, tried in several different ways but I have not yet been able to do it. public login(credenciais):Observable...
asked by 06.08.2018 / 16:22
1
answer

Problem creating project with Angular CLI

A nice personal day, I'm starting my studies in Angular 2, I use docker to manage my containers. At the beginning I'm already having problems, the creation of the project has been presenting errors. When you run the command: ng new pr...
asked by 06.08.2018 / 16:36
0
answers

Return data of another component

I have the following problem, I create the user and add the same in a course. I just can not return the course name on the user page. The course is added via select input, sending only the ID of the course. When I return via {{user.curso}}...
asked by 23.07.2018 / 17:53
1
answer

Can not read property 'token' of undefined when receiving object from angular localstorage

My login function stores a token returned from api in localstorage : localStorage.setItem('token', res.data.token); Soon after logging in, I need to pass this token to another function, but I can not get my variable to receive the t...
asked by 23.07.2018 / 18:29
1
answer

Angular4 wait for callback to API without timeout

If you can help me, please. I need to make a call in the API but there are a lot of data and I want Angular to wait for this term, at that moment I put a promise but it does not wait and as long as the API is handling the data on the NodeJS s...
asked by 23.07.2018 / 15:21
1
answer

Close sidenav when width is less than 700

I have a sidenav of angled design material that I need when the width is less than 700, open the screen with the nav closed, and when it is larger than 700 the screen can open with the nav open. I tried something like: @ViewChild('sidenav'...
asked by 22.07.2018 / 19:24
0
answers

Set MatDatePicker component format

How to set the format of the DatePicker component in Angle 6. In my Angular 6 app, I'm working with the Cloud Firestore database of Firebase . When performing a document query, when the document has a field of type Timestamp retur...
asked by 21.07.2018 / 15:57
1
answer

Perform tests based on component lifecycle

I need to run the tests following the lifecycle of the Angular. I could not identify any tool or way to do this. Basically it would call the tests based on lifecycle. Here's a simple example: my-component.ts : import { Component } fro...
asked by 08.08.2018 / 20:08
0
answers

Error: Duplicate resources Angular Cordova

I'm trying to compile an angular app on the cord. I pasted the application into the www folder of the cordova project and tried to compile, but I had the following error: Execution failed for task ':app:mergeReleaseAssets'.   C: \ Users \ p...
asked by 27.07.2018 / 16:38