All Questions
285 questions
25
votes
6
answers
134k
views
How to disable a checkbox based on conditions in angular 6?
My html code,
<div>
<div>
<input type="checkbox" id="Checkbox0" name="cCheckbox0" class="custom-control-input" (change)="checkSelected(checkBox[0].label)">
<label class="...
39
votes
4
answers
211k
views
How to navigate to other page in angular 6?
Im trying to redirect my page from login to another page. Im following this code.
My login component ts file:
import { Router } from '@angular/router';
constructor(private router: Router) {
}
...
32
votes
7
answers
105k
views
Convert HTML to PDF in Angular 6 [closed]
I have a component (Angular 6) which is an aggregation of several components. This produces a long HTML (I am using Bootstrap 4). Now I want to convert this HTML to PDF. I have searched far and wide ...
7
votes
5
answers
51k
views
How can I display image encoded in base64 format in Angular 6?
I struggle with a problem associated with Angular 6 and displaying image encoded in base64 format. Any ideas why code shown below doesn't display image?
html:
<tr *ngFor="let row of this....
6
votes
7
answers
24k
views
Change ngx-pagination CSS
How can I change ngx-pagination CSS? I tried with:
:host /deep/ .ngx-pagination {
padding-left: 0px;
}
:host /deep/.ngx-pagination .current,
.btn-info {
background: #17a2b8 !important;
border: ...
29
votes
4
answers
6k
views
Angular 6 - Is it possible to use two angular element components on the same page?
I'm trying to host independent angular elements that I can drop into a non-angular webpage. It's working great when I have just one.. but when I load two or more on the same page I get this error:
...
5
votes
6
answers
2k
views
Angular detect dynamic page title on route change
I have an angular 6 application where i want to store the page title on every route change,
import { Router, NavigationEnd, NavigationStart, RoutesRecognized } from '@angular/router';
export class ...
6
votes
4
answers
33k
views
Dynamically change background color of mat-expansion-panel-header based on whether or not it is expanded
I've been struggling to find a way to dynamically change the background color of a material design expansion panel header based on whether or not the panel is expanded.
When the panel is closed I'd ...
0
votes
1
answer
11k
views
How to get multiple values from multiple select drop down in angular 6?
My code is given below,
<select multiple [(ngModel)]="myModelProperty" name="category" (change)="catFilter($event.target.value);hName($event.target.value);" class="form-control">
<...
4
votes
3
answers
16k
views
click event is not working in innerhtml string angular 6
I am working on an generate dynamic template using angular 6. I have an API that return strings like below:
<button type="button" (click)="openAlert()">click me</button>
and html
...
-1
votes
1
answer
1k
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 ...
5
votes
4
answers
8k
views
Hiding horizontal scrolling bar doesn´t work using simplebar library
I'm using simplebar library (https://github.com/Grsmto/simplebar) inside of an angular 6 project, when I added the simple bar in my html tag, it showed up an horizontal and a vertical scroll bar, so I ...
2
votes
2
answers
6k
views
Angular set focus to an input that is in a <td> of the table Using table object in component
I have a table which populates data dynamically.I have multiple input tags in it and I want to shift the focus for the input to the next input which is in the next td tag when a user press the right ...
4
votes
2
answers
5k
views
Go Back in Angular 6 when skiplocationchange is true
Routing in Angular 6
When i route to a particular location i navigate with
route.navigate(['/home'], { skipLocationChange: true });
but when returning back to previous route the below code is not ...
11
votes
10
answers
5k
views
Positioning of divs in center and right and left for any browser(cross-browser)
Three div panels:-
1) (div-B) one div with max-width = 500px and min-width=400px should always on
the center of all browsers.
2) (div-A) one div should show and hide on the left of (div-B) having ...