Most voted "angular-6" questions
Use this tag for specific questions about version 6 of Angular, Google’s web framework. Use the [angular] tag for any question about Angular that is not specific to an individual version.
Learn more…118 questions
Sort by count of
-
5
votes1
answer152
viewsCreate a new template for each N *ngFor elements
Hello, I have an array items:any[] and I want to iterate in the view with the *ngfor, however, I am using a template <carousel> where for every item of that slide I call <carousel-item>,…
-
4
votes1
answer57
viewsGenerate component at angular
When I execute the command ng generate component configure-notification/configure-notification-edit --module app he gives the following error: /usr/bin/ng: line 40: exec: generate: not found before…
-
3
votes1
answer3965
viewsCannot find control with unspecified name attribute Angular
I’m trying to make a simple component using Reactive Forms in the input, but this giving error that until now had not seen Input.components.ts import { Component, OnInit, Input } from…
-
3
votes6
answers674
viewsAngular 6: Selected does not work with [(ngModel)] and (ngSubmit)="onsubmit()
I receive the Customer class in my form import { NgSelectOption } from '@angular/forms'; export class Cliente { nome: string = ''; carros: any [] = [ { id: 1, modelo: 'Gol',selected:false }, { id:…
-
2
votes1
answer364
viewsTable mat-table does not render in browser with Angular 6
In the browser debug caught this error(screenshot): This is my page html (test) <div> <label>Nome: <input [(ngModel)]="operator.Name" placeholder="Nome"> </label>…
-
2
votes0
answers96
viewsImage does not appear in the table
Use Angular 6 and bootstrap. I have a table and did this to display an image: ........ <tbody> <tr *ngFor="let operator of dataSource"> <td>{{ operator.operatorId }}</td>…
-
2
votes7
answers7167
viewsHow to receive the CPF number and format to be without the dots and dash(Input Mask )
I’m creating a mask with inputMask, but the number is received so: 222.222.488-19. And I want him to have the mask on input but when sending it will be without the dots and the dash. Like this…
-
2
votes2
answers1211
viewsHow to Create a Reusable Component in Angular
I am with a system where all modules have a standardized record listing screen with pagination. I adapted a pagination code I found on the Internet to make pagination on demand. However, instead of…
-
2
votes1
answer4397
viewsForm validation with angular 6
I have this form, very simple, with just a field and a button. I gave a required input, and when I write with the empty and/or null field, it does not write(correct), but already switches to the…
-
2
votes3
answers2679
viewsApply mask to an HTML table column with Angular?
How to put CPF mask in a table ? For inputs I used the ui-Cpf-Mask directive, but need to put in a table cell. code: <tr *ngFor="let user of users | async"> <td>{{user.nome}}</td>…
-
2
votes1
answer977
viewsReuse component in another component and get child data in Angular
I made a zip code search component this way: I created the component, its HTML is: <fieldset [disabled]="isLoading"> <div class="row col-md-6"> <div class="row"> <div…
-
2
votes1
answer218
viewsngx-bootstrap + angular 6 + datepicker
Hello, I am using ngx-bootstrap datepicker for the first time and am encountering some difficulties. One of them is that when selecting the desired date, my input is in the exact format I need, as…
-
2
votes1
answer102
viewsHow can I shape the object generated by Frombuilder?
I use Formbuilder to generate an object and send it to an API, but the generated object is not quite the format the API expects. I need to know how to add objects inside objects using Formbuild. I…
-
2
votes1
answer60
viewsUpload progress with angular 6 and Asp net core 2.2
I am sending a file selected by the user in the browser through the tag "input" to the Asp net core and would like to display the progress of the upload. I currently only get the Enum…
-
1
votes2
answers71
viewsHow to write to mongodb via API
I have this API(Controller) [Produces("application/json")] [Route("api/[controller]")] public class TypesFieldsController : Controller { private IAddTypeFieldService addTypeFieldService; public…
-
1
votes0
answers83
viewsLoad component dynamically
How do I load a dynamic component depending on the module I’m seeing in Angular? I want to have a sidebar that will show content according to the module. For example: If you are looking at the Users…
-
1
votes0
answers438
viewsHow to change the angular version within an Asp.net core project
I have an Asp.Net Core 2.0 project. Well, I now need to build some screens to make one CRUD using Angular. One should use the Angular 6, here at the company. Well, when I added in this Solution the…
-
1
votes1
answer343
viewsCalling route from a button is not working
I need, when I create an Operator, after creating, I should call another screen, the list of operators. It turns out that it is not working. The route is called Operator and how I put on that…
-
1
votes1
answer2161
viewsType an array of type any[] at angular 6
I need to type an object, not to receive any[] in agular 6. Well, no get, I get this from the API: { "error": false, "itens": [ [ { "operatorId": "819ee9cc-70b6-44dc-b9e8-afff8705142c", "name":…
-
1
votes0
answers109
viewsUncaught (in Promise): Error: Staticinjectorerror(Appmodule)[options]
I have the following problem, I have a project that was in Angular 5 and was migrating to the Angular 6, after this, the problem below began to occur, someone give a help, please.…
angular-6asked 6 years, 4 months ago Paulo Cesar Moura 11 -
1
votes1
answer102
viewsChangedetectionstrategy from the Angular
When studying Angular 6 I was seeing that it has different strategies of how Component is updated according to the Events, XHR and Observables within my application. After much research I did not…
-
1
votes1
answer279
views -
1
votes1
answer693
viewsI can’t load data into an angular mat-select 6
This is my html <div class="container"> <form [formGroup]="createForm" (ngSubmit)="onPostCreateTypeFields()" style="width:400px; margin: 0 auto;"> <h1>Fields</h1> <div…
-
1
votes2
answers2064
viewsHow to perform a function on one component and affect another component - Angular 6
I would like to know how I can through one component affect another component at angular 6. These components are not father and son. They are distinct. <app-navegacao></app-navegacao>…
typescript javascript-events angular-6 angularjs-componentsasked 6 years, 2 months ago Leonardo Vinicius 335 -
1
votes1
answer1879
viewsAngular 6 CLI command to create a Component in a specific folder
Is there any way to create a Component in Angular 6 CLI by specifying which folder it should be in? I searched the net and found the ng g c nome-componente --module=app but this is just to say that…
-
1
votes1
answer643
viewsCall delete at angle 6
I have this HTML <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <table class="table table-striped table-bordered table-hover"> <caption>Lista…
-
1
votes0
answers20
viewsUpdate(Put) on my project does not write to BD(Mongodb)
I need to make an editing screen and I’m not getting it. See how my Component is doing(I’ve eliminated Imports to save space) @Component({ selector: 'app-operators', templateUrl:…
-
1
votes2
answers1678
viewsObservable, when to use?
Why and when should I use the Observable, what are its advantages and disadvantages and its difference compared to Promisses?
-
1
votes0
answers40
viewsAngular 6 subscribe
Console.log return Undefined I have the following code snippet: Service: constructor(private http: HttpClient) { } getCentrosCustos() { return this.http.get<CentroCusto[]>(API); } Component:…
angular-6asked 5 years, 6 months ago user150504 -
1
votes1
answer162
viewsProduction build problem when using Cryptojs
I have an application written in Angular 6 and there was a need to send a hash to the client. The contractor approved only the use of the library crypto-js. I did the implementation and everything…
-
1
votes1
answer155
viewsVoid function with Spring returning null at Angular 6
I have the following code to just delete a record in the bank and that should return a result with the status 204-OK. I use Spring Rest on the back and a void method with a…
-
1
votes0
answers75
viewsImport an angular design within another angular design
I would like to know if it is possible for me to import an entire project in angular in another project, exemplifying let’s say I have a financial project and a stock project both ready and running…
-
1
votes0
answers40
viewsFilter items by category with angular 2+
I am new at the angle, and I need to do a filtering. I have a program listing and I want to filter these programs through a menu. For example, in the menu you will have the categories: football,…
-
1
votes0
answers65
viewsAngular 6 - Can Deactivate Guard is not working
I’m having trouble getting Can Deactivate to work on my app. In the form.component.html file I have the following code: <div class="form-group"> <label for="quoteType">Quote…
-
1
votes1
answer69
viewsCheck JSON Login Result with Angular 2x
My service to enter has: entrar(data: any): Observable<any> { console.log(data.email, data.senha); return this.http.get(`${this.baseUrl}/` + '?email=' + `${data.email}` + '&senha=' +…
-
1
votes1
answer28
viewsOninit variable upgrade - Angular 2
I have the variable: compromissoInicio = ‘’; In the onInit, have: this.enviaForm(this.funcoes.homeAtualiza); That is, if homeAtualiza for true, the system updates the information as below: ...…
-
1
votes0
answers109
viewsHow to work with events at Angular?
Watch the image; This image appears when the textbox is different from NULL as shown below; But it should only appear when editing. This is my component class responsible for this page; export class…
-
1
votes1
answer198
viewsSeparate Methods of an Angular Component 6
Hello everyone, I have a Component with 1266 lines, due to its large volume of methods, I need to separate these methods to facilitate a future maintenance, only problem in this is that I have local…
-
1
votes2
answers501
viewsHow to disable an edit module property in Angular?
I have an Angular application of version 6, and when I click on the project to edit the system loads the editing screen with all values, this application is not with database and there is a back-end…
-
1
votes2
answers235
viewsAngular 6 Undefined property in JSON
I consume an API that returns a JSON to me. The return works perfectly, however, when I try to access some property of this JSON, it gives me as Undefined. I already JSON and is ok JSON: [ {…
-
1
votes1
answer628
viewsFilter *ngFor async data
As a filter is applied to a *ngFor async, the *ngFor array comes from an Observable. lotes$: Observable<Lote[]>; *ngFor="let lote of (lotes$ | lancamentosFilter:searchText) | async; let i =…
-
1
votes1
answer724
viewsCollapse navbar does not work in angular 6
People, I’m trying to make a navbar component using Bootstrap 4 and when I put on mobile the button to show the rest of the menu it doesn’t work when I do with an HTML, CSS and JS it works smoothly,…
-
1
votes2
answers581
viewsAngular 7 / Typescript error: Property 'result' does not exist on type 'Element'
I have a function that runs while performing the upload of files, however I am having an error in result within the function onload. This mistake makes no sense because if I give one console.log in…
-
1
votes1
answer876
viewsAngular Calendar 6 - Calendar does not display events on first load
The calendar shows no events on the first load. Only when I trigger any event like clicking the button to change the month-to-week view, for example. I’m using the Angular Calendar 6+ LINK My design…
-
1
votes0
answers427
viewsHow to extract Header Token to store in Local Storage?
Good night, you guys! I’m in a battle to get back the token I send from my backend to my browser. Follow my Back code in Python: class Login(Resource): def post(self):…
-
1
votes0
answers121
viewsIonic 4 + Nodejs: Module not found: Error: Can’t resolve 'dgram' in
I’m creating an app using Ionic 4. In this application I need to use some libraries of Nodejs: dgram, fs, path and among others. But when I run my application, it returns an error message Module not…
-
1
votes0
answers264
viewsVariable does not receive Subscribe() - Angular 7 data
I’m having a problem in my code. I’m using angular 7, in it I’m having difficulties on a screen I import a file. I want to run a "spinner" that will be shown when I click on "send", it runs Spinner,…
-
1
votes1
answer3039
viewsError : Can’t bind to 'formGroup' Since it isn’t a known Property of 'form'
I am creating an app in IONIC V 4 In the form using Formbuilder added the tag [formGroup] appeared two errors : <form [formGroup]="formRegister"> and the other : The componet…
-
0
votes1
answer664
viewsHow to consume an API using Angular 6?
How to get feedback from the post through the Component? Code: service import {Injectable} from '@angular/core' import {HttpClient,HttpHeaders} from '@angular/common/http' import {Observable} from…
-
0
votes1
answer61
viewsExport Angular input value
Good night, you guys. In Angular 6, I have the following code: import { Component, OnInit } from '@angular/core' import { FormGroup, FormBuilder } from '@angular/forms'; @Component({ selector:…