Questions tagged [angular]

Questions about Angular (not to be confused with AngularJS), the web framework from Google. Use this tag for Angular questions which are not specific to an individual version. For the older AngularJS (1.x) web framework, use the angularjs tag.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Need window resize event to calculate height

I have a question regarding the grid height for scrollable grid. The thing is from source This solution doesn't provide a good answer for me. Because it has styles: [` html, body, my-app { ...
-2
votes
0answers
6 views

how to copy a table in metronic? like bootstrapsnipping

I'am having a hard time on how to use buttons/tables/designs on my project i don't know how to plot the codes. Thanks for answering my questions.
1
vote
0answers
10 views

Does zone.js have something to do with css not rendering?

I have a print preview CSS and it is all working in my current location. I've tested it in different browsers and computers and they're all working fine. But when viewed in Japan location, CSS doesn't ...
-1
votes
0answers
6 views

Cannot use\log value after subscribe it

Imagine I have a list of todos to manipulate just after get it from my api, like: todo.service.ts: import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @...
0
votes
1answer
20 views

Angular Typescript: Add Dynamic CSS reading from Array

How do I dynamically add SCSS styles reading from an Angular array? We have an angular array with following members. class ItemList{ productName: string; highlight: boolean; } It contains ...
0
votes
0answers
5 views

Angular 7 working with IE problems works with ng serve but not when generated with ng build

Need to get IE 11 working with app. Modified polyfills.ts to allow Angular to support IE 11. Then ran "ng serve" to test locally. IE then functioned as expected. Then ran "ng build". copied the files ...
0
votes
0answers
10 views

PDF with CSS using jsPDF in Aungular 8

I am using the jsPDF to create a pdf file and decorate it with CSS. However, I keep getting the error ERROR Error: You need either https://github.com/niklasvh/html2canvas or https://github.com/...
0
votes
0answers
13 views

Subtitle in Toolbar

Android's ActionBar supports subtitles natively. I want to do the same with mat-toolbar in android but I cannot find any examples. It should be a smaller text below the title of the toolbar.
-1
votes
4answers
47 views

Typescript: Iterate Through Each Member between Two Classes and Flag Difference in Angular

How do I compare two class models and find corresponding differences? Following are two models which have exact same members, and we need to compare. Is there an algorithm in Typescript which ...
0
votes
2answers
43 views

Sync Ajax calls in Angular

I want to test server for a given value and return calculation based on that, but I don't know how to make sync calls in Angular/TS/JS. For example I want the following function return an integer ...
0
votes
1answer
23 views

get request to txt file in assets folder | Angular 8

I tried to make a get request to assets folder. I have there txt file. But I have always mistake "not found" ngOnInit() { this.apiService.getData().subscribe( suc => { console.log(suc); },...
0
votes
1answer
20 views

What are the advantages/disadvantages of performing operations in pipe() rather than directly in subscribe() method?

I'm new to Angular and I'm filtering the user with the id same as in the JWT payload. I can do this in the subscribe() of the Observable like this: this.route.data.subscribe((data) => { ...
0
votes
1answer
22 views

I can't return new observable looks like doesn't work

I am hagving problems with Observables I have next code: public save(): any { var that = this; try { debugger;//1 return new Observable((observer) => { ...
1
vote
1answer
23 views

Directive @Input variable not getting update when component update the value

I am trying to dynamically validate the custom-text-input based on service call result. If its true means jumpyId is available to use otherwise show error. My issue right now is when i update this....
0
votes
0answers
7 views

Google Charts DataTable no longer working after upgrades in .NET Core and Angular version

I have been upgrading my build environment and have broken my Google DataTable code. Changes from the working version to the broken version include upgrading .NET Core from 2.1 to 3.1, upgrading ...
0
votes
0answers
20 views

Angular bind two select to object and store only the selected value

I have in my Angular component html 2 selects. The model select shows the models of the selected brand above. Currently the problem is that I want to store both as string but I am receiving from brand ...
0
votes
0answers
4 views

agm-map on a non-active ngb-tab using fitbounds with GeoJson

I'm trying to get an agm-map to show on a second tab of an ngb-tabset, and to fitbounds around the geojson that gets loaded. Here is a stackblitz with the map on the first tab - it works fine, apart ...
1
vote
2answers
19 views

Populating Observable with initail value while listing to chnages

I have an Observable that needs to have an initial value on creation but it also needs to listen to events and in case of change it should re-populate with data from the server. Seems simple enough ...
2
votes
1answer
18 views

How to do the filtering in a pipe of a resolver in Angular?

In my routes.ts I have { path: 'members', component: MemberListComponent, resolve: { users: MemberListResolver} },. I have the following piece of code in my component: users: User[]; ...
0
votes
1answer
15 views

Angular: Do functions on components execute for each instance of the component?

I have a component in my Angular app whose template includes two additional instances of the same component, like this (in template for component1): <div> <...other tags...> <...
0
votes
1answer
17 views

How do i show and hide details on a single item on click

So id like to just click the name and the rest of the details will just drop down on that single customer order, thanks <ion-card *ngFor="let item of AllOrders; let i = index;"> <...
0
votes
1answer
17 views

TypeError: Cannot read property 'forEach' of undefined Angular

ObtenerClientes(cantidad: number): Observable<Array<Cliente>> { const urlCliente = `${this.url}/?results=${cantidad}`; const lstClientes: Array<Cliente> = []; ...
-3
votes
0answers
22 views

I'm trying to convert a fully made html site to an angular project [closed]

I'm trying to know is there a way I can convert a full html site into an Angular project and just consume api's that are already made? Thanks
-1
votes
0answers
13 views

BitBucket Pipeline Angular - ng build -prod error: The build command requires to be run in an Angular project

Lots of new stuff to me here (Angular, BitBucket Pipelines) so I'm going to be explicit in my process. I'm using a Windows server command prompt.  I have ng and npm installed.  I created the Hello ...
1
vote
1answer
28 views

Property Binding in Angular 2

I'm attempting to create inline editing functionality on tabular data in an Angular 2 application. Each row displays an edit icon which toggles the inline editor. When editing, there should be two ...
0
votes
0answers
7 views

Angular SSR 'require' not working when AOT used

I have an app and in angular universal. I have a case where I have a component and I need to dynamically load stylesheet based on env variable. This is how its done: ... @Component({ selector: 'app-...
0
votes
1answer
9 views

With Angular Reactive Forms, is it possible to have separate 'updateOn's for each validator?

I have field that is both required and has a max length. If the user goes over the max length and moves on to another field, I want to show an error. However, if the user clicks on the field and types ...
-3
votes
2answers
33 views

how to fix comment “there are numbers, should be constants”

Got comments on my piece of code which says, there are numbers , should be constants. What should I do to fix? Below is my code snippet. if (level < 0) { return 'XX'; } if (level < 1) { return ...
-1
votes
0answers
28 views

Replacement for ResponseContentType in Angular 8+?

In this question: Angular 6 ResponseContentType The Author imports ReponseContentType like this: import { HttpClient, ResponseContentType } from '@angular/common/http'; Is there a replacement for ...
0
votes
0answers
19 views

Uncaught (in promise) undefined

I am getting the following error in chrome, and have no idea where it is coming from: The only thing that is really telling about anything is that I recently refactored about 10,000 lines of code and ...
0
votes
1answer
25 views

Filter button using for loop crashing

I have it a buy it now only filter button that filters listings that allow that option. Right now with the for loop in the code below, the app crashes when button is clicked. If I remove the for loop, ...
0
votes
0answers
19 views

I'm trying to get Role from back-end then use it in front-end but Angular can't read it after function

public Role; ngOnInit() { this.getRole() { this.roleserive.getrole(this.token) .subscribe( res => { this.Role = res; console.log(this.Role) ...
0
votes
1answer
23 views

Using keyboard input to login in Angular

I have a button, when clicked goes to the next route/page in Angular. Is there a way we can use the same button but instead of clicking it sometimes give the user to enter a secret passphrase on the ...
0
votes
1answer
21 views

Difference between services and exporting functions in Angular?

I'm a little confused about when to use a service, versus when to export functions or classes. Here's what I mean by exporting a class: See the top answer here Angular 2: Functions to be used across ...
1
vote
1answer
40 views

Angular to C# Http passing query parameters

I think the C# HttpGet TEMPLATE is what I am missing, but here’s the details. On the Angular front end: let params = new HttpParams() .append('GDWarn', values[0].toString()) .append('GDLimit', ...
0
votes
0answers
13 views

Why Ionic and angular don't update the view after click in button of ion-alert component

Why after click in a button in the ion-alert component, the view don't get update ? For example if i have a property in my component called sending and a handler for a button of my ion-alert : // ...
0
votes
1answer
23 views

Remove class from Viewchild Element after setTimeout in Angular2

Hi I want to remove some classes from two elements but nothing happens with my code. My html <div class="d-flex ml-auto align-items-center animated fadeInRight faster" #outgoing> ... </...
-2
votes
1answer
23 views

Does angular js come along with css templates? [closed]

Does angular js come along with css templates? Or do we need to explicitly add the styles?
0
votes
1answer
14 views

ngIf else with angular Ionic template

I'm trying to understand how the ngIf/else works, maybe it's something stupid but I don't get it. Basically I need to print some content if my array is full (and this works fine) and some other ...
0
votes
1answer
34 views

why my app.component.html file is not working?

whenever i run my program it gives me a blank screen. except the title name . below is the source code of my project. i also tried it by writing html code in app.component.html file but still it is ...
0
votes
0answers
12 views

How to remove data from native storage in ionic 4

i'm actually trying to remove a precise data in my native storage and i try to use splice but i'm not sure that its working like this , do you have an idea ? this.nativeStorage.getItem('AccepterPart'...
0
votes
2answers
41 views

I changed the css tag li by id and not worked

I developed a timeline however in css I had li {my css li ..} and was in conflict with other classes and libraries. In order to solve this, I tried to add in html in the tag I read an id and did the ...
1
vote
1answer
31 views

Sort the item inside a menu (A-z)

I have a custom menu in angular. I want to sort it in alphabetical order. I have static and dynamic items in it. How can i sort this? Below is the HTML code. <div class="dropdown-list dropdown-...
0
votes
0answers
6 views

Problem to run Ionic/Angular app in Android Studio (io.fabric not found)

i am having an error in Android Studio, when i tried to run my Ionic/Angular app, i got an error "ERROR: Plugin with id 'io.fabric' not found." I already copied the config.json file from Firebase (...
0
votes
0answers
12 views

Angular Slide In, Slide Out Animations

I was thinking that a slide in, slide out, animation would be a pretty standard thing to do in Angular (using version 8.x at the moment), but I'm not able to find any examples to help get me over a ...
0
votes
1answer
27 views

invoking an event on click of button on another component

I have a paginator (from primeNG) where I have implemented some logic on the onPageChange event like so: <p-paginator #p class="paginator_mot" [alwaysShow]="false" [rows]="...
0
votes
2answers
20 views

Remove Angular Material Textbox border, without Ngdeep affecting other Components

Is there any way to remove Material Textbox outline borders without Ng deep, affecting other components? Need to remove borders below, this code affects other components within the page How to ...
0
votes
0answers
11 views

<mat-spinner> is completely static in my angular app

I am trying to add a mat-spinner from Angular Material to my Angular app. The mat-spinner documentation can be found here. In the documentation, you can see the spinner continuously spins with just ...
0
votes
1answer
16 views

How to apply a component's [ngClass] to its child element

Is there a way to allow ngClass to be set on a parent element, but redirect it so the classes are actually applied to a child element? <!-- Parent Component --> <app-progress-bar [ngClass]="...
0
votes
2answers
22 views

can't use custom validator in reactive form to confirm passwords in a change-password page

This is the custom validator I have atm : import { FormGroup } from '@angular/forms'; // custom validator to check that two fields match export function MustMatch(controlName: string, ...