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.

1
vote
0answers
10 views

Angular 7: Trigger valuechanges on addControl, if value's present

I'm adding/removing controls from my form based on some conditions. if(true) { this.form.addControl('age', new FormControl(this.resp.age)); } this.form.get('age').valueChanges.subscribe(val => { ...
0
votes
0answers
9 views

how to apply back and forth scalling to all objects in fabricJS?

I have multiple canvas in one screen using fabricJS. I have added some ITexts, Text Box, Image, Background in each canvas. I have some scalling options, like 25%, 50%, 100% to 300% in increasing ...
0
votes
0answers
8 views

404 while trying to generate models with swagger codgen

I am developping an application using angular in the frontend and spring boot in the backend.I am also using jhipster in both back and front.I want to generate models and services of the frontent ...
0
votes
0answers
12 views

app compiler time with `ng serve --aot=true` takes more time than just `ng serve`

I my angular app, i have no.of modules. when i change something with html or css it take time to re-compile. so i decided to start with ng serve --aot=true but I find it take more time to run the app ...
0
votes
0answers
8 views

Site does not open in Safari Macos from link but opens from address bar

We have a testing environment with several sites. On of them works perfectly in Chrome, but when you try to open it in Safari (common or Tech Preview) the page is blank with error 500. Refresh gives ...
0
votes
2answers
33 views

How to use the same data to another page without recall service?

i need to pass the same data with more information to another page using click event on my item. I tried to extend the class father to child but it's too slowly because the class is called a lot of ...
0
votes
1answer
16 views

Changing the username should effect in all other pages

I am using ionic4/angular4.the changes made to the username should reflect in all pages. here I am using ngModel to bind the data but I am unable to access the ngModel variable in other pages. Please ...
0
votes
0answers
14 views

How to connect Jwt protected Express.js Rest api with angular app

I protected my api with json web token. How can I connect this to my angular app. There will be no Login and Register in the application. I've done a lot of research on Google, youtube and ...
0
votes
1answer
6 views

Ng2SearchPipeModule giving error filter not found

i am using Ng2SearchPipeModule for filtersearch but its giving error like Uncaught Error: Template parse errors: The pipe 'filter' could not be found i have imported and added module in import of my ...
0
votes
1answer
19 views

Angular 6: ERROR Error: Cannot find control with unspecified name attribute with angular material and reactive forms

I have array of string from which I want to display it in textbox. I am using reactive forms. I know there are similar questions too. But I didn't get the solution. So I am posting this as a new ...
0
votes
0answers
15 views

How to implement correctly Reset Password at ASP Core and Angaular

I'm trying to implement my Password recovery to the user who entered his email, My problem is: I don't know how it should work exactly, I can send email successfully but the link sent to him need to ...
1
vote
1answer
22 views

I got error:Repository is not clean. Please commit or stash any changes before updating

I want update my project angular6 to angular8. First: run npm install -g @angular/[email protected] (this code is ok). Second: run ng update @angular/cli @angular/core. And I got this error: Repository ...
0
votes
0answers
8 views

Cant edit sharepoint documents in iframe

I can view a sharepoint document by adding '&action=embedview' to the url, this will prompt me to login if I havnt already. however I wish to be able to edit the document in my iFrame I have ...
1
vote
0answers
14 views

Angular Universal Bundle keep loading with blank page

Was trying to convert simple angular application to universal supported application. Did all the required changes like added check on all DOM elements such as window, navigator, settimeout, etc. ...
0
votes
0answers
16 views

Is there any way to fully run Template with javascript in Angular?

I've been purchasing a template from themeforest. The template is also have it's own javascript files. How do I fully run the template on Angular with it's own javascript included? I used Angular 8 ...
0
votes
1answer
26 views

Why required message not shown when using mat datepicker?

I have the following template: <input type="text" class="form-control" name="my_date" [matDatepicker]="myDatepicker" #myDate="ngModel" [(ngModel)]="myDateValue" id="my_date" ...
-2
votes
0answers
26 views

Modules shared between multiple projects in Angular 8?

I have two projects that have the same "core" funcionality, for example they share the same layout and have same pages, but there are components and modules that are project specific, so currently I ...
0
votes
1answer
25 views

Why value is not populated inside the input in mat datepicker?

I have current template: <input type="text" class="form-control" name="my_date" [matDatepicker]="myDatepicker" #myDate="ngModel" [(ngModel)]="myDateValue" id="my_date" ...
0
votes
1answer
24 views

Angular - Set up two URLS for index page

My situation is that I have two parts in one Angular site, A User and B User. These two users have different Layout styles, menu, etc. They are linked to my site from another site, so I have to ...
0
votes
0answers
22 views

Unable to create project using `ng new command`

When I run the ng new angular-practice command I get following screen:
1
vote
0answers
28 views

canDeactivate in case of returning first false, next time true navigates twice

I have some kind of "Unsaved changes" pop-up, where the user can cancel the back navigation. In this case, when the user clicks cancel (canDeactivate guard returns false), but then tries to navigate ...
0
votes
0answers
20 views

Angular Mat DatePicker format issue

I'm new to Angular and I just jumped into an existing project. My issue is about a date picker from angular material. If I select a date via the toggle, no issue, the date is correct but if I want to ...
0
votes
0answers
12 views

File upload after NGRX dispatch action

I'm currently using ng2 file upload from valor software to perform image upload to server. My previous code was written this way: After added a new post, the image uploader will upload the image ...
0
votes
0answers
20 views

Change the selector of child component in dynamic component

I am trying to change the selector of the child component based on the child component content. (i.e.) If I get the child component result as a paragraph, the HTML content with paragraph tag should ...
0
votes
0answers
16 views

Angular Material DatePicker user input error with autocomplete

There is a already known issue with the mat-datepicker but the solution is not working perfectly for me because I got different date formats depending on the current selected language of the website. ...
0
votes
2answers
36 views

Is there a way to merge two form array controls?

I have two form arrays in my code. I need to combine them and perform addition and deletion on the combined array. I need to concatenate the form array controls of each form array let a = this....
-3
votes
0answers
11 views

i have an error src/app/manage-devices/devices.component.ts(212,9): error TS1005: ',' expected

i have an error in my angular 6 code while start the angular server. the angular server is automatically completed while i update any part of my code. src/app/manage-devices/devices.component.ts(212,...
1
vote
0answers
28 views

Angular 4 How to send boucling data to java backend?

To begin with, here are the classes i'm using: Organisme import { Dispositif } from './dispositif'; import { Niveau } from './niveau'; export class Organisme { id: number; organisme: string; ...
1
vote
1answer
24 views

How to combine data from Observables data fetched inside a loop made on another Observable result in Angular 7 and RsJS?

I have a method that returns an Observable with a car data: getCars(): Observable<any> { return this.get(`/cars`); } And another that returns Obserable with car parts: getCarParts(carName:...
0
votes
0answers
24 views

Running into a loop due to auth guard

I am redirecting users to permissible views using routes. But users that do not have permission to a view can route to it by providing the path[route] in the address bar. I tried using auth-guard, ...
0
votes
4answers
37 views

Fixed hamburger icon angular

I generated a header component using ng generate @angular/material:material-nav --name header, in this I need to have the hamburger icon fixed even if the screen size is larger. Right now it appears ...
0
votes
1answer
38 views

Cannot get first value of array from generic function (Angular)

I have a generic method to get data from back-end and pass it to an array Here is the code of the method, where I pass method for getting data, array and default value, where I need to write the ...
0
votes
0answers
15 views

Getting outdated index.d.ts from npmjs

Hi I have an npm module that I am updating (react-native-fs) but it seems the latest version zip file I got from www.npmjs.org contains an outdated index.d.ts file, causing me failed to use some added ...
0
votes
0answers
19 views

How can i send push notification to ionic app with using angular website as an app server and firebase

I want to send push notification using firebase but the admin should be able to send notification from angular website which is an admin portal to ionic app can some one help me with this. Thank you
1
vote
2answers
48 views

Angular - Focus on input element that has ngIf

I have two input elements that are shown under *ngIf conditions. <input type="text" id="textInput" *ngIf="showTextInput"> <input type="number" id="numericInput" *ngIf="showNumericInput"> ...
0
votes
1answer
21 views

Angular image tag src binding localhost url

Im using angular 7 and I want to add image from other project. My local project domain url is localhost:5700. Here i tried to use image of other project like below. <img [src]="/var/www/html/mvf/...
0
votes
0answers
16 views

Unable to access private variable declared on a class from a call back function [duplicate]

In my data service , I am trying to display error using toastr, on an exception. To do that I am creating a class, loading the API , on success return data , else handle the exception. export class ...
0
votes
1answer
38 views

Hide text of text area based on a condition in angular

I have a textarea and I want to hide the text of the textarea based on a condition `<textarea class="form-control" [ngClass]="{'pointer-events-none cursor-disabled' : model.userPrivilage....
0
votes
0answers
26 views

How to test the javascript “DELETE” operator in Angular?

i need some help. I want to test a for in loop which deletes an object property. My problem is that my tests are not included in the code coverage. The code coverage page shows me that the operator "...
0
votes
0answers
37 views

Input box attribute set dynamically on radio button change

I am having 20 mat-expansion-panel and each expansion-panel having one radio group and each radio group having 5 radio buttons, and below radio button there is one comment box. So I want something ...
1
vote
1answer
20 views

Angular service worker : initiating network status

I want to make my web like google spreadsheet(offline-mode), i've been able to detect the network lost. But when the connection is offline, the network status give me online status. constructor() { ...
1
vote
1answer
26 views

How to make subtitle text smaller in Angular Material card

I learn Angular Material and wonder how to make the subtitle text smaller. Look at the picture: <mat-card-subtitle>press enter on search</mat-card-subtitle> It has almost the same size ...
0
votes
4answers
61 views

How to alternate by rows and 2 rows using CSS [duplicate]

I have a requirements to display the data in the UI with the ffg scenarios: Alternate colors by row if I select Capital see image below Alternate colors in every two rows if I select Country and ...
0
votes
0answers
34 views

I have problem in handling token for angular with web api

I have a problem on my node js code that want to communicated with my asp.net core api I have a login app to manage my authenticated information for this purpose I create angular authenticated app ...
0
votes
0answers
12 views

Angular: 2-way binding with mat-select not working, assigning value in code causes it to reset in UI

I'm trying to bind a mat-select to an enum value like this: <mat-form-field> <mat-label>Type</mat-label> <mat-select [(ngModel)]="selectedType" [compareWith]="compareType">...
1
vote
0answers
31 views

Laravel API return 401

I am working on mobile app and I connected my app to server through API now every time I try to do actions that requires users authentication I get 401 error while same action with postman do the job ...
0
votes
1answer
21 views

How to notify the current routed component from previous component when a task execution is completed?

Example Scenario: I am submitting a registration form in one component which takes at least 5 minutes, before the submitting process is completed I am redirecting to some other component, now I want ...
0
votes
1answer
20 views

Angular 7: Exporting Angular elements from an Angular library

I'm trying to export angular custom elements defined in a library L - through the constructor of the AppModule of the library L(customElements.define('my-custom-element', myComponent)). On importing ...
0
votes
0answers
20 views

How to set lazy module file load path in Angular, js file cannot find in Apache

Code works fine in dev mode. But not work after deploying to apache. AppModule works, and other lazy module cannot work, link path is not same with the static files path. Home page path is http://...
0
votes
0answers
9 views

Function OnConnected in Cross domain in SingalR web api + angular 6

I'm using SignalR for asp.net api + angular 6. In Config server: public void Configuration(IAppBuilder app) { ConfigureOAuth(app); app.Map("/signalr", map => { ...