Questions tagged [angular6]
Questions about Angular version 6, the web framework from Google. Use this tag for Angular questions which are specific to only version 6. Use tag Angular for any Angular questions which are not specific to an individual version.
7,877
questions
0
votes
0
answers
20
views
ngfor display not according to array received
Below is the object i receive from the backend
{
"30-04-2022": [
{
"id": 3,
"user_id": 3,
"amount": 178000,
"created_at&...
0
votes
1
answer
28
views
Nested http calls in angular 6
I am trying to make a nested Http call work in angular 6. Basically, i am trying to iterate through a for loop and make two server side calls, i want to purge the data from those two responses. Whats ...
-1
votes
1
answer
18
views
Adding SL number to a angular table
I have the following table where in the table is generated using an array:
<tbody *ngFor="let ques of questArray;let i =index">
<tr *ngif="catId == ques.categoryID">
&...
-1
votes
1
answer
67
views
Negative validation not working in Angular
I have the following HTML Angular tags, which need to trigger a validation error when there is a negative value entered in any of the groups of textboxes (dynamic array).
<tr *ngFor="let order ...
0
votes
2
answers
64
views
Add click event on element still not in dom
I have to add click event on a anchor element that can load later I know in javascript I can do like this.
document.addEventListener('click', function(e){
if(e.target && e.target.id== '...
-1
votes
3
answers
41
views
Conditional reset method "if disable ignore not disable reset" angular
<div>
<div>
<label>Name</label>
<input type="text" [(ngModel)]="name" [disabled]="editData"
</div>
<div>
<...
0
votes
0
answers
20
views
Cannot find module './declarationBlock/Width'
I am facing a very strange problem, my project worked well some days ago. I am using the Angular6 version in my project and my node version is v10.8.0 and npm version is 6.2.0. but today I facing this ...
0
votes
0
answers
37
views
Accessing elementRef inside MatButton. Angular 6
I'm trying to get boundaries of an element. It works well with div, however when I'm trying to do the same with button with angular material directive I'm getting the MatButton object and I can't use ...
1
vote
1
answer
29
views
How Can do some operation once UI rendered completely in Angular8
I want to perform some operation only after UI completely rendered.
Since child component is coming as undefined
child-component is from library (component from another application added as dependency)...
0
votes
0
answers
89
views
how to reduce the file size for uploading?
file upload gets a 413 error when uploading a file greater than 40mb.
Here i send the file attachment parameter as an base64string. For a 40mb size file , also gets a long base64 string.
so how could ...
0
votes
2
answers
63
views
How can I disable two textboxes when a checkbox is checked? I am using Angular 6
form.html
<input id="okornot" class="form-check-input" type="checkbox" name="chkbx1" formControlName="" (change)="checkBelts($event)" /&...
0
votes
2
answers
159
views
Angular6 Can't use ternary operator in ngClass with multiple entries
I'm trying to add multiple classes by ngClass, and I'm confused as to why I can't use ternary operator here.
<div [ngClass]="{'otherClass': otherFlag, classFlag ? 'class--true': 'class--false'}...
0
votes
1
answer
39
views
Can't serve Angular 6 on Windows 10
I'm having a problem serving an Angular 6 project in a PC with Windows 10.
I have the Angular CLI installed with version 11.2.18 and the ng command works, but when running ng serve it throws this ...
-4
votes
1
answer
114
views
Fetch input values created by ngFor on button click Angular
I have an input field which is being generated using *ngFor and I want to capture all those values inside the input field on submit button click. I have tried all possible ways but not able to get the ...
-1
votes
2
answers
173
views
Use ngFor for showing data in two different places from same Array Angular
I have a single array whose data I need to display at two different sections using *ngFor. Like I have two sections: Section 1 and Section 2. From the below array I need to display keys having values ...
-1
votes
1
answer
55
views
onclick radio button make textbox value null and hide textbox
I want to calculate the amount
Eg: product cost
material
GST
So if i Enter product cost, material cost(uses radio button) and GST it will show the result but the issue is when i click on no option the ...
0
votes
0
answers
39
views
Typescript error in grahpql-tag with angular 6
node_modules/graphql-tag/lib/index.d.ts(2,57): error TS1005: ',' expected.
node_modules/graphql-tag/lib/index.d.ts(2,63): error TS1005: ',' expected.
Getting those error for graphql with angular 6. ...
0
votes
0
answers
406
views
ERROR in node_modules/pdfjs-dist/types/src/display/api.d.ts(678,29): error TS1005: ';' expected
I have a project that is still using Angular 6.
I upgraded NodeJs to 14.18.1 and fixed the node-sass issue with version ^4.14.1.
When I execute "npm run start:local" (running local at port ...
0
votes
0
answers
59
views
How to fix my angular page from flickering on every rest call in settimeout()
I have checked numerous stackoverflow questions and have not found a solution for the way I am trying to achieve things.
Please bare with me as I am an amateur in angular 7.
So what I have done is, I ...
0
votes
0
answers
10
views
ng2-google-places-autocomplete enter key to select first location in Angular 6
I have Google Autocomplete location field in my HTML form. It works perfectly when we select the suggestions using mouse selection.
I want to select the first location when we press enter key in ...
0
votes
0
answers
64
views
ngModel in nested formarray in angular
I have in my angular app each invoice a set of items(details), and each item has several discounts , when a new discount is added, it is calculated from total before discount and tax subtract the ...
0
votes
0
answers
72
views
p-multiselect dropdown get hidden in table tr
I am trying to solve one wiered issue that appears only when [resizableColumn]="true" is used in p-table.
I am using p-multiselect inside header for column wise filtering and while doing so ...
3
votes
1
answer
195
views
Error: Local workspace file ('angular.json') could not be found when upgraded to Angular 6
I have upgrading my project from Angular 5 to Angular 6. When I try to run the application using npm start it is throwing a below error.
I know that there is already questions like this that has ...
0
votes
0
answers
24
views
Property 'subscribe' does not exist on type 'BehaviorSubject<Dictionary>' [duplicate]
I am using BehaviorSubject for the communication between components. But when I try to subscribe, it is throwing an error as "Property 'subscribe' does not exist on type 'BehaviorSubject'."
...
0
votes
1
answer
166
views
Property 'subscribe' does not exist on type 'Observable<any>'
I am trying to get data from googleTagmanger. But I am getting error as "Property 'subscribe' does not exist on type 'Observable'" Below is my code.
this.translate.get('newtest....
1
vote
1
answer
261
views
How to implement google analytics ecommerce Enhanced for transaction only with angular Npm library no javaScript
Hello I am implementing google analytics for ecommerce project where I have done all requirement but only I want to show that revenue in google analytics I research a lot but I am getting JavaScript ...
0
votes
1
answer
27
views
Repeat input type file when user enter number
If user enter integer inside textbox eg:3 then the file uploader will display 3 time
i am start learning angular so it will be great if some give me solution.
here is link:https://stackblitz.com/edit/...
0
votes
0
answers
72
views
is there any way to print different html components merge into one pdf file?
I already generate pdf file by creating html components. The "Id" given in html file generates the pdf by using "html2canvas & jsPDF". If there are multiple html component, ...
0
votes
1
answer
211
views
Module not found: Error: Can't resolve '@ng-plus/signature-pad'
I am working on an angular6 project tried to add a signature pad but after installing the package npm install @ng-plus/signature-pad --save the error message is showing
ERROR in ./src/app/app.module....
0
votes
0
answers
20
views
ng-content with toggler button angular 6 project
I have below code in my angular 6 project wherein we are displaying toggler switch button kind of 'Active' and 'Completed'.
Below is code for the same. here I am setting the default selection to '...
0
votes
0
answers
23
views
Get old value and new value from dropdown | Angular2
How can i get the oldSelected Value and Newly Selected Value from NG-SELECT;
<ng-select
[(ngModel)] = "attribute[attribute.id]"
[items]="...
0
votes
2
answers
46
views
is there any ways to detect the application is currently in which platform like mobile or web?
I have to run my application on web and mobile platform simultaneously. But have to know the platform is mobile or web?. According to which platform is switched, I have to slightly change the code ...
0
votes
1
answer
81
views
how to group data with 2 keys from array object
Hello I want to display data in table in that table there are all input field with reactive form so
Here is output coming from response
var arr = [{
"empId": "111222",
...
0
votes
0
answers
87
views
How to resolve pagination and filter option issues in angular6
In my application i have used isotope-layout npm module for filter option(https://www.npmjs.com/package/isotope-layout) for pagination ngx-pagination used(https://www.npmjs.com/package/ngx-pagination)....
1
vote
2
answers
132
views
How to define a model class in angular8(TypeScript) or above for nested JSON response coming from SpringBoot backend code
I want to define a model class in angular8 for the below nested JSON response.
JSON Response:
{
"message": "All Users fetched",
"status": "Success",
"...
0
votes
2
answers
384
views
ERROR TypeError: this.signaturePad.set is not a function
I am developing an angular6 project with ngx-signaturepad. I followed the documentation https://www.npmjs.com/package/ngx-signaturepad but I am getting the error
'ERROR TypeError: this.signaturePad....
-4
votes
2
answers
1k
views
How to loop through array of objects in angular 6?
I am very new to angular and I am assigned to a task where I want to get data from an API and iterate and display it in a chart. My angular version is 6.
This is the response JSON format, It is a ...
2
votes
2
answers
655
views
How to fix ERROR in node_modules/chart.js/types/animation.d.ts(20,37): error TS1005: ',' expected. in chart.js
I am working on an Angular 6 project where I want to create some charts using chart.js.
I installed chart.js using npm install chart.js and its version is like 3.5.1.
My TypeScript version is like 2.9....
1
vote
1
answer
375
views
How to fix error TS2416: Property 'canActivate' in type 'KeycloakAuthGuard' is not assignable to the same property in base type 'CanActivate'?
I am very new to the angular project. After I clone the project and try to up the project with ng serve.
So I am getting an error like.
ERROR in node_modules/keycloak-angular/lib/core/services/...
0
votes
1
answer
51
views
No matching version found for commander@2.18.1. in Angular 6
I cloned project from git and try to enter npm install. So it is telling like
Why im getting this and how to fix this?
Thanks.
0
votes
2
answers
424
views
Increment counter for nested for loop in Angular
<tr *ngFor="let adjustment of adjustments; let i = index">
<td *ngFor="let blade of adjustment.blades; let j = index">
<span> Counter = {{ ???? }} </span&...
6
votes
2
answers
993
views
Trigger an event on scrolling to the end of Mat-0ptions in Mat-Select : Angular 6
I recently started modifying a project based on Angular 6 and ran into a bit of an issue.
So, I have (lets assume) 4 Mat-Select fields, for Language, Currency, Country and Organization.
Initially all ...
0
votes
0
answers
18
views
padding to parent div or to anchor div [duplicate]
I am designing a website wherein I have a top parent div which container and children are as below:
<div class="parent">
<div class="row">
<div class="col-...
0
votes
0
answers
26
views
Angular 6 local setup
I am having my angular 6 setup locally which communicates to API with HTTPS enabled and having HTTPS certificate imported locally. My concern is if I am trying to run just another application that is ...
0
votes
1
answer
124
views
CORS issue using Dot Net Framwork 4.5.2 with Angular 6
I am having CORS issue on app made in DOT NET FRAMEWORK 4.5.2 & Angular 6 on frontend
This is what I tried yet.
public static void Register(HttpConfiguration config)
{
// Web API ...
0
votes
0
answers
26
views
Provide abstract class in angular 6
we are having one abstract class
export declare abstract class APILoader {
abstract load(): Promise<void>;
}
In component 'CustomerComponent' it was injected in the constructor like
export ...
0
votes
0
answers
51
views
p-table filter not working with 'contains' in some cases
Global filter of p-table has an issue? I have some records and when I search 'test.txt'(full name) it filters properly but if I search'test' it does not filter the content instead it includes some ...
2
votes
1
answer
67
views
Can't bind to 'formGroup' since it isn't a known native property
I have upgraded my application from Angular 2 to Angular 6 version. ng build --prod is building application successfully. I am able to login into my application and 50% functionality is working ...
1
vote
2
answers
308
views
My Angular 6 project failing to build. node_modules/@angular/core/core.d.ts(12620,86): error TS1110: Type expected
Whenever i try to build the project i get the screenshot error message below. Have included my package.json file with the dependencies i use.
Been a few days struggling with the same problem and the ...
1
vote
0
answers
22
views
How to create a custom typeahead using angular-formly which should be generic, any suggestions?
I am new to formly, I tried creating typeahead but got stuck. Please help me out in creating typeahead.