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
5 views

Angular 8 Guards from link url or from browser url

Is there any way to detect if someone tries to click a link on the already opened site or try to enter for first time the site from canActivate guard?
0
votes
1answer
13 views

How to set padding between mat-icon and button title

<button mat-raised-button color="warn"> <mat-icon>delete</mat-icon> Remove Driver </button> How to add padding in between mat-icon and button title? I want to keep ...
0
votes
0answers
8 views

Checkbox list in Angular reactive/dynamic form

Trying to build out a reactive/dynamic form using Angular8, strugglign with rendering a group of checkboxes. I've followed the tutorial at https://angular.io/guide/dynamic-form, and have it up and ...
0
votes
0answers
5 views

jrxml binding to Angular 8

Is it possible to bind jrxml format to Angular 8? As we are using JasperReport till date to make reports. Do we have any alternative to make reports in angular in our own formate and design.
0
votes
0answers
8 views

Generate random colors for ng2-charts (pie-charts)

html <div style="display: block;"> <canvas baseChart [data]="pieChartData" [labels]="pieChartLabels" [chartType]="pieChartType" [options]="pieChartOptions"...
1
vote
0answers
10 views

How to host a angular app correctly on cpanel?

Problem: I have developed a web application using angular I did the production build. After production build inside dist folder, there was a folder call frontend I rename that folder as an example as ...
0
votes
1answer
23 views

How to load the selected option JSON object from an array by clicking button?

I have typescript file of JSON objects. These JSON objects can be selected as options from a dropdown list. I need to know how to load/instantiate the selected JSON object when the user clicks the ...
0
votes
0answers
15 views

How to build a form with image upload using firebase and angular?

I want to build a form which collects data like name, address etc and photo of the person. I have successfully implemented the string data form. It collects all the string data I need and save them ...
0
votes
1answer
38 views

How to map preselected value of multiple input field into an array in angular 6

I have some input field,From which I need to capture its preelected values into array format like {"userid":1,"newstatus":[1],"mygroup":[1,2,3]} on submit, I tried with ngmodel but its not working ...
0
votes
0answers
6 views

https-proxy-agent upgraded to 3.0.0 but npm audit still showing not fixed

As of October 18, 2019, with a fix provided for NPM package https-proxy-agent, even after upgrading to the latest version, the audit warning still shows as 6 high vulnerabilities. Running npm audit ...
0
votes
1answer
18 views

Formatting Phone Number Input In Angular

I have seen many solutions to formatting a phone number input field in Angularjs, but I cannot find anything on Angular 7. What I essentially want is for the user to type the following in the ...
0
votes
0answers
29 views

angular opening a pop window throws an error

I am creating a CRUD application while taking the angular tutorial. I have a "Add New " button on my main (Home) page. The name of the home component is "AngularCRUDCompnent". when I ckick on that ...
0
votes
1answer
14 views

Filter pipe throws an error that data is undefined when data is returned from a service

I am using Angular 6 and I built a custom filter pipe. When I was using this with static data it was working fine but when I am getting the data from a service it throws an error "Cannot read ...
0
votes
1answer
23 views

How to have a form control value as an object and render its label in input field?

I have simple form where I have input field with autocomplete (Angular Material components). The thing is, when I select value from autocomplete box, Input fields yelds [Object object] as value while ...
-1
votes
0answers
36 views

What difference between arrow function and regular function in delegates [duplicate]

I don't understand why this code does not change rooms value this.roomsService.createRoom(room,this.refreshRooms); public refreshRooms(rooms: Array<RoomModel>) { this.rooms = rooms; } ...
0
votes
0answers
19 views

Setting a FormArray to an array of FormGroups

How can I set a FormArray of a FormGroup? I want to set definitionProperties. this.processorForm = this.fb.group({ propertiesSide: new FormControl(), objectNamesSide: new FormControl(), ...
0
votes
0answers
17 views

Resolve path and load a specific component based on condition

I want to resolve a path using Angular Resolver. I currently do that with a parent primary routing set as follows: { path: '**', component: HomeComponent, resolve: {routing: RoutesResolver} } In ...
0
votes
1answer
20 views

.NET core JWT authorization failed?

I'm trying to get JWT working here, the token is successfully received on my client end after login but when I request user info at the /info route, the authorization fails. Any help would be much ...
0
votes
2answers
30 views

How to publish event from a component and receive it from another component in nativescript

How can I publish custom event from a component and receive it from another component in nativescript. something like: ComponentOne.ts this.event.publish('someEvent', {name: 'a name'}) ...
0
votes
0answers
15 views

Render multiple different dynamic form controls selected using a drop down menu in Angular

So i am creating a quiz app and in my app there is a drop down menu with three options like a textField, radio button etc and I choose from drop down to create a dynamic form control. I am using ...
0
votes
1answer
30 views

How to pipe value to another observable creator without cancelling original stream?

What I wanted to do is to implement suggestion box for the UI. The goal here is to listen to input changes, filter them out, pass them to service call and return results. What I did is this.sub = ...
0
votes
0answers
16 views

how to create wrapper directives for Controller in AngularJS

I'm trying to do upgrade controllers/components written in AngularJS1 to Angular6. I'm taking the approach of having the wrappers for all the existing AngularJS1 controllers/component by extending "...
0
votes
2answers
23 views

Using Activated Route param variable in GET request returns null

I have a component that is listening to an Observable that returns information based off of a name provided in a string. I would like to provide the name to the Observable by passing in a variable ...
0
votes
0answers
8 views

“ApolloError: Network error” in SSR Angular Universal, apollo-angular app

Every time I fetch data in component by apollo-angular in builded app, error below pop up and crash it. I don't really know what's that error mean. When I tried to get more info about it but its doesn'...
-2
votes
0answers
10 views

Using cdkDropList/cdkDrag with array of components

I understand that it is possible to create a cdkDropList from an array of strings as per: https://stackblitz.com/angular/njgnakglaxm?file=app%2Fcdk-drag-drop-sorting-example.ts. I want to do do this ...
0
votes
1answer
38 views

How paginate from data is coming from a json in Angular

I am new in this I have a service with HTTPclient is get all the data from a JSON file have 1000 register, how I can make pagination, for example, show the first 10 and paginate it this is my service ...
0
votes
0answers
14 views

Google Candlestick Chart object mapping

I recently installed Angular Google Charts and their data format doesn't match mine. Is there a way I can match both models or their chart can't handle it? Example of google charts: @ViewChild('...
0
votes
1answer
21 views

Using Angular 7, how do I call a function when Bootstrap Collapse expands?

I am building a Hacker news clone using Angular 7 and what I am trying to achieve is when the user clicks on a button next to a comment they will see the child comments. I have added Bootstrap 4 ...
-1
votes
0answers
19 views

XMLHttpRequest is blocked by CORS policy, sent using HTTP interceptor in angular 7

I am using angular 7. In my sample application i am using http interceptor for each request made to the server.In one of my scenario my service GET request works and fetch data , but when i modify ...
0
votes
2answers
37 views

Async call to HttpClient get

The following code is used to get a file asynchronously. This method belongs to a service. It is called from the constructor of AppComponent class. public async ReadConfiguration () { ...
0
votes
2answers
33 views

Command 'ng' not found, but can be installed with

I installed node v12.11.1 and npm 6.11.3 on ubuntu 19.4.but when I want to create angular project I get this error .and also installed angular cli Command 'ng' not found, but can be installed with ...
0
votes
1answer
57 views

HTTP GET request doesn't work through Angular app

Recently I have set up back-end for my app. I use MEAN stack and by far everything goes well. I wrote couple of HTTP handlers including POST, PATCH and GET requests. POSTs and PATCHes are working ...
0
votes
1answer
32 views

how check if the data is complete load to use async pipe Angular 8

I have a json file to simulate a request to an API I am using httpClient in my service I return it service this is my home component this is my html home component but I am doing something wrong ...
0
votes
1answer
13 views

How to plot line chart with multiple datas, but only 2 labels?

So, I've been using ng2-charts to so I can create components using the chartjs library in my angular application and I want to plot a chart that shows only the first and last label and point so the ...
0
votes
0answers
14 views

How to dynamically build a Google Chart element with Angular 8 and Typescript

I am a bit new to Angular (version 8) and Typescript. I have code where users choose what type of chart, columns, and title to make a Google Chart after a click of a button. I have tried to put the ...
1
vote
4answers
50 views

Using infer to grab the boxed Observable value

I've created a pipe to convert any source to an Observable, as follows: // If T is like an Observable it infers the inner value, otherwise it returns T type Unobservable<T> = T extends ...
0
votes
1answer
21 views

How can I use tabs and pages in one application?

Is it possible to use tabs with pages? I made an example. It has the following structure: main (page) tabs (use as a container) ---> app-routing.module.ts (routing for tabs) ---> home (tab) ---> ...
0
votes
2answers
41 views

update view after variable changes

I am using a library lib-sqv to display some html. If the field options has a value from the beginning, than the view displays the html correctly. Here is my working code if you want to try: app....
1
vote
1answer
19 views

How to make generic component with form control input for Angular Forms in app

I've created component for datepicker that I want to use in many other components in my application. I have some problems becouse it doesn't change value of parent form group control. Lets get to the ...
0
votes
0answers
22 views

Giving Angular component selector existing html element

What happens when I set the selector of some component to div or body or p? The behavior I notice ranges form nothing being rendered to partial rendering and as far as crashing/not loading the page. ...
0
votes
0answers
13 views

Wavesurfer.js can't recognize the container of waveform

I'm using wavesurfer with angular, i tried to put the container of the waveform inside a blocks of html tags with *ngIf and *ngFor, when i ran the project, angular gave me a error message like this "...
0
votes
0answers
20 views

How to capture value of checked checkboxes and select box into an array using reactive form in angular 7

I have an reactive form which contains some textboxes,checkboxes and select box.Here on submit of form I need to capture the value of those fields into this format {"email":"[email protected]","password":"...
0
votes
0answers
12 views

Angular 8 mat video player problem with progress bar

i have problem with mat-video module into my project. I'm trying to display a video and that works correct but a video progress bar takes 20% of full video width and i can't set full width. Code: ...
0
votes
0answers
6 views

Ionic Deep Links Navigate but don't load component

I am trying to get ionic deep links to open specific content inside my app when a link is opened via push notification. When I click the link, the correct area of the app is opened, but the component ...
0
votes
0answers
12 views

Execute FPDF script locally in Angular 8

I require your help because, I want execute a FPDF php file from my local files in Angular 8 directory, My file I search to execute is pdf.php, this file is inside the directory make-bulettin in my ...
0
votes
1answer
19 views

Performance issue for huge data in mat-option angular 6

I have used Material approach for dropdown menu for my vendor data. There are more than 12000 i.e. 12k + data in vendor. Using mat-option, I need to use *ngFor which takes hell of time. This makes my ...
1
vote
0answers
18 views

breadcrumb not always updating after Angular route changes

I have an Angular 8.2 application with a dashboard and links to other sections of the application. When a person clicks on a section link say 'Data Management', the section name is displayed in the ...
-1
votes
1answer
25 views

Angular CLI refuses to pass in ng command

I have been trying since last week to install the Angular CLI correctly in my Mac. I have concluded that it might be Apple's new operating system (Mac OS Catalina) that isn't letting me advance in any ...
1
vote
1answer
23 views

Dynamic path based on service result

I am using Angular 8 to create a WordPress theme. I want to allow the user to select a custom permalink structure from the WP Dashboard. Note: this is not a WP question. I am just mentioning WP for ...
0
votes
1answer
17 views

Error displaying image using Capacitor and Ionic

I am trying to write a simple Camera app using Ionic 4 and here is my code snippet for capturing the image and displaying it in an Ionic tab. export class UploadPage { yourImage: SafeResourceUrl; ...