606 questions
1
vote
0
answers
122
views
How to make chekbox required only if one of them is selected with FormGroup
I have some problem with custom validation in Angular 4 using FormGroup and FormControl.
I have page with multiple checkboxes, in this example 6 of them. Three of them are required all time, and ...
0
votes
0
answers
90
views
Getting reactive form values in Angular 4
I am using reactive form in my Ionic project.
I have multiple slides and each slide has a form. When i'm trying to retrieve the value I'm getting the value from the first slide.
Stackblitz link for ...
0
votes
1
answer
366
views
Angular 4 search box with duplicate text
Angular 4 serach box issue
How to stop the value in second search box text when we enter value in one text box.
we have multiple searchbox for each of the item in my page.when we type any text in one ...
0
votes
0
answers
54
views
Reset the drop down values in angular4 with customized fields
While migrating old angular app to angular 4 I came across this in .js file
customized dropdown
hps-dropdown model="studentRequest.CountryType" reset-id="countryResetId"
is-required="false" options=...
0
votes
0
answers
205
views
How validate FormArray control in Angular 6
My HTML looks like this -
<form name="add_stepform" [formGroup]="ActionTypeForm" novalidate>
<cdk-virtual-scroll-viewport [itemSize]="100" class="stepViewPort">
<div [@...
0
votes
1
answer
754
views
what is the $location.search() in angular 4
how to use the $location.search in angular 4
var queryParams = $location.search(); -- in angular
setDefaultLanguage() {
var queryParams = $location.search();
if (queryParams.locale) {
...
1
vote
1
answer
59
views
How to pass locale in get service call using angular4
Need to find the locale and pass the same to service(get) call :
Property 'indexOf' does not exist on type '() => string[]'
Heading
in angular4.
//Call Languages
getshortLanguages() {
...
0
votes
0
answers
64
views
Called Api Once and used many component in Angular 4?
I have two component Master and MasterDetails and one service name MasterService when first time load master component its working fine but if I navigate to MasterDetails component then I get blank ...
0
votes
2
answers
1k
views
How to access global variables assigned in one function in another function in angular
I am new to angular.
I have form-control.component.ts file
in that I have declared these 3 variables globally
name1:any;
pw :any';
g :any;
these 3 variables I have used in one function
...
0
votes
2
answers
502
views
How to call/Get the out parameter from an API to Angular4
Here I am working with a post method on angular 4 web app.When entering data and click the confirm button the values(data) are saved to the db.It works successfully, but my problem is at the same time ...
0
votes
2
answers
520
views
How to show other textarea when dynamically adding checkboxes to template using ngfor
I am current using ngFor in order to generate the checkbox HTML. However when using this method I am unable to assign a specific template reference variable to the other checkbox only in order to show/...
1
vote
1
answer
1k
views
Angular 7 Form Validation and Display error message
Please look my simple form in Stackblitz
https://stackblitz.com/edit/angular-et9uww
My form contains 2 checkboxes if I select one of the checkboxes it will populate one textbox. In my scenario, I ...
0
votes
2
answers
5k
views
Angular 4 Currency Pipe with Input Text Field
I have an input field that I would like to display proper currency formatting upon data entry from the web user (USD)...
A little background on this, the previous input mask I was using would start ...
1
vote
0
answers
987
views
Angular Forms - why and when we are using markAsPristine() function?
I need to get the better understanding of the use of markAsPristine() function.
2
votes
1
answer
834
views
Unable to bind default value using formControl with shared component
I have a custom dropdown in which i need to update or set default value using formControlName.
I am using ControlValueAccessors in the shared component so that I can attach formControls to them in ...
1
vote
3
answers
400
views
How to set and get form values when we use css dropdown as shared component
I have a shared component which is a html and css dropdown.
I am calling this shared component from a parent component with different data.
For example I have 3 instances of shared component from ...
2
votes
4
answers
226
views
Angular - TypeError: Cannot read property 'jobTitle' of undefined
I am building a Angular7 app implementing ReactiveForms Validation I am putting my validation messages & their display control all in component.ts
create-job.component.ts
import { Component, ...
0
votes
1
answer
423
views
Uses of ibm-carbone-styles
I decided to use https://angular.carbondesignsystem.com/?path=/story/welcome--to-carbon-angular this styles inside my frontend.
I took 'Accordion' from the list and tried to implement it to my ...
2
votes
4
answers
9k
views
Submitting a form by pressing enter key in angular 4
By pressing Enter key need to submit the form in angular 4
below is my code in form Action = "" is not working.
I also tried with (keydown) = domonething(event) and (keydown.enter) = domonething(event)...
0
votes
2
answers
2k
views
Angular = array length is always 1?
The following is the code in typescript,
count: number;
this.count is accessed from html component.
console.log(this.count) gives me 5.
var arrObj:number[] = new Array(this.count)
console.log(...
0
votes
3
answers
645
views
how to load the angular 6 application fast in browser?
how to reduce the time for loading of the application. My angular6 application has one app module. under the app module, I have so many components like home, signup, login, user-dashboard, client-...
3
votes
5
answers
8k
views
Angular ng-select : selectedItems.map is not a function
When I'm using ng-select in reactive form angular I get this error:
ERROR TypeError: selectedItems.map is not a function
I have 3 select the first two work very well but in this third one I get the ...
1
vote
1
answer
1k
views
Calling the CSS style from typescript append it to html file
On button click function CSS style to be called with in the TS file
html code:
<div class="overlay-loader">
<div *ngIf="isLoading" class="loader"></div>
<p *ngIf="...
1
vote
1
answer
7k
views
Angular 4 ERROR TypeError: items.filter is not a function
I do have a struggle understand custom filters in Angular 4. I know the version is a bit outdated but my project is entirely built with Angular 4 and i can't update it since the release is this month. ...
0
votes
0
answers
25
views
canvas tag does not appear after angular 6 migration
Recently my team has migrated our app from Angular/core cli 4.3.2 to 6.1.10. tag does not appear on the browser. Code is as below
<canvas *ngIf="selectedSWP" class="donut" baseChart [data]="[ ...