Skip to main content
Filter by
Sorted by
Tagged with
234 votes
11 answers
177k views

I'm trying to do a custom validation on Angular 5 but I'm facing the following error Expected validator to return Promise or Observable I just want to return an error to the form if the value doesn't ...
Renê Silva Lima's user avatar
229 votes
20 answers
269k views

I am trying to implement an icon that when clicked will save a variable to the user's clipboard. I have currently tried several libraries and none of them have been able to do so. How do I properly ...
anonymous-dev's user avatar
229 votes
16 answers
445k views

I am working a front-end application with Angular 5, and I need to have a search box hidden, but on click of a button, the search box should be displayed and focused. I have tried a few ways found on ...
Bob's user avatar
  • 2,413
211 votes
45 answers
745k views

When running the terminal commands ng server or ng serve --live-reload=true, I'm getting this issue: The serve command requires to be run in an Angular project, but a project definition could not ...
Gurpreet Singh's user avatar
161 votes
6 answers
50k views

I am recently learning Angular 6 with @ngrx/store while one of the tutorial is to use @ngrx/store for state management, however I don't understand the benefit of using @ngrx/store behind the scene. ...
Drex's user avatar
  • 3,901
143 votes
7 answers
160k views

Is there any npm module/ other way like React-Helmet that allows us to change page title as we route through our Angular application? PS: I am using Angular 5.
Vishal's user avatar
  • 11k
140 votes
23 answers
245k views

I can't inject MatDialogRef as it described in documentation: https://material.angular.io/components/dialog/overview When i'm trying to do it i'v got error: ERROR Error: StaticInjectorError[...
devKazakov's user avatar
  • 1,909
124 votes
9 answers
258k views

I'm triggering a HTTP request and I'm getting a valid response from it. The response also has a header X-Token that I wish to read. I'm trying the below code to read the headers, however, I get null ...
Sahil Khanna's user avatar
  • 4,422
120 votes
8 answers
534k views

I have added the CORS in header but I am still getting the CORS issue in my request. What is the correct way to add and handle CORS and other requests in the headers? Here is service file code: ...
Aman Kumar's user avatar
  • 1,602
113 votes
26 answers
408k views

After migrating application from angular 5 to 6, on running ng serve the following errors pop up. Schema validation failed with the following errors: Data path "" should NOT have additional ...
V5NEXT's user avatar
  • 2,097
104 votes
6 answers
296k views

I am using Angular with Material <button mat-icon-button><mat-icon svgIcon="thumb-up"></mat-icon>Start Recording</button> I am trying to add an icon to button, but I can't ...
Alexander Mills's user avatar
99 votes
3 answers
24k views

I am using the Angular-CLI 1.6.6 and @angular/service-worker 5.2.5 in our Angular 5.2.5 app. Everything works fine on the local lite-server, as well as on the production server, except for one error ...
tobik's user avatar
  • 1,319
97 votes
9 answers
286k views

I have an Angular 5 form application using all the usual models but on the forms I want the form to submit without having to physically click on the 'Submit' button. I know it's normally as easy as ...
murday1983's user avatar
  • 4,105
90 votes
14 answers
126k views

I have a little web app with Angular 5 and out of a sudden I am getting this strange error message in my browser console: ncaught Error: Template parse errors: No provider for ControlContainer (" ...
Marvin H.'s user avatar
  • 1,279
82 votes
6 answers
77k views

In one of my unit test files, I have to mock several times the same service with different mocks. import { MyService } from '../services/myservice.service'; import { MockMyService1 } from '../mocks/...
hbaltz's user avatar
  • 821
80 votes
3 answers
253k views

I have 2 radio buttons, I'm using reactive forms and I have added the form controls within my component. The issue I am facing is that the name attribute has to be the same as the formControlName. ...
Taranjit Kang's user avatar
77 votes
2 answers
240k views

I'm using Angular 5. I want to know how can I start timing when a 'play' button is pressed, in order to know how much time has passed since I clicked. I'd also like to know if it's possible to stop ...
Samuel's user avatar
  • 866
75 votes
10 answers
140k views

My current URL is http://localhost:4200/test/dashboard. I want to print base URL i.e http://localhost:4200 using Angular 5 features.
him's user avatar
  • 3,575
68 votes
9 answers
92k views

How can I set default selected last button in toggle group. This is my code. <mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle value="Heritage"> <...
Hossein Bajan's user avatar
66 votes
8 answers
301k views

We have deployed the api on azure and trying to consume in our web app written in angular 5. However when we try to consume the api we are getting following errors. Chrome Mixed Content: The page at ...
XamDev's user avatar
  • 3,687
64 votes
6 answers
156k views

I have file upload control which holds the selected file as below, <div class="Block"> <label id="lbl">File </label> <input #fileInput type='file'/> </div> I have a ...
Karthik's user avatar
  • 701
64 votes
9 answers
133k views

I am trying to update my Angular app from v5 to v6 following this guide. I have ran all these commands successfully: npm install -g @angular/cli npm install @angular/cli ng update @angular/cli The ...
Ahmed Elkoussy's user avatar
63 votes
5 answers
85k views

I was programming myself a pretty nice api to get some json data from my gameserver to my webspace using json, but everytime i am sending a request using angular i am getting this: 127.0.0.1 - - [20/...
Lars Erhardt's user avatar
63 votes
8 answers
115k views

I have data streaming from backend and i see it printing in console now i am trying to push event to dataSource its throwing error dataSource is not defined. Can someone help how to dynamically add ...
hussain's user avatar
  • 7,193
63 votes
6 answers
73k views

Currently I'm working on a project which is being hosted on a clients server. For new 'modules' there is no intention to recompile the entire application. That said, the client wants to update the ...
Lars Meijdam's user avatar
  • 1,175
61 votes
4 answers
91k views

I keep getting the following errors when running unit tests Error: StaticInjectorError(DynamicTestModule)[ApiService -> HttpClient]: StaticInjectorError(Platform: core)[ApiService -> ...
user avatar
59 votes
3 answers
146k views

Hello im trying to implement firestore into my web application, when i add the service to contructor the error: NullInjectorError: No provider for TesteventService! I'm using Angular 5, angularfire2/...
Mr. Toast's user avatar
  • 1,899
58 votes
7 answers
62k views

I am using Angular 5 with Reactive forms and need to make use of the valueChanges in order to disable required validation dynamically component class: export class UserEditor implements OnInit { ...
dfmetro's user avatar
  • 4,612
55 votes
6 answers
141k views

I have two components, One parent and Other Child. HTML Part <div> <div class="row col-md-12"> <div class="col-md-4"> <!-- Some HTML Code of Parent component over ...
Saurabh Singh Rajput's user avatar
55 votes
2 answers
48k views

In my app I have a category page that has links to a various product list pages. If it turns out that when you get to a product list page there is only one product then it automatically navigates to ...
HisDivineShadow's user avatar
55 votes
5 answers
72k views

are reactive forms the way to go in order to have a component that can listen for changes in the validity status of the form it contains and execute some compoment's methods? It is easy to disable ...
Cec's user avatar
  • 1,824
55 votes
1 answer
11k views

I am wondering how the new angular service decorator @Injectable({ providedIn: 'root' }) works in conjuction with lazy loading. Meaning if I have a lazy loaded module, with a service that is ...
Karl Johan Vallner's user avatar
54 votes
6 answers
107k views

i created grid list with column 6 and i want to be grid title take 100% width on small screen devices. Now it creates 6 column on small screens as well Expected: One grid-title occupies 100% of space ...
Somnath Swami's user avatar
51 votes
7 answers
90k views

I'm trying to set the value of 2 fields <input matInput> and <mat-select> programmatically. For text input everything works as expected however for the <mat-select> on the view this ...
TomOw's user avatar
  • 1,341
51 votes
4 answers
74k views

I have the following directory structure I would like to create a new page, let's say, an About page. I want to put it in src/app/page/about/* So I try: ng generate component pages/about but I get ...
Alexander Mills's user avatar
50 votes
8 answers
77k views

I am converting a purchased, third-party template into an Angular 5 app, and just ran into an error. I am very new to Angular 5 (I know AngularJS well however) and don't understand what it's trying to ...
Todd Davis's user avatar
  • 6,055
50 votes
7 answers
87k views

I am trying to create a URL from an object in an Angular 5 SPA. My code looks like the following: import { UrlTree, UrlSegmentGroup, DefaultUrlSerializer, UrlSegment } from "@angular/router"; const ...
Alexei - check Codidact's user avatar
50 votes
4 answers
48k views

I'm trying to buy a angular 5 template online so I just want to confirm for angular version. I have check This question of Angular :- How can I check which version of Angular I'm using? But ...
Bhavin's user avatar
  • 2,208
49 votes
4 answers
132k views

So I want to reload the app after navigating to a specific route .. I use router.navigate to navigate to certain route based on user role and that works fine but I have to reload the page after ...
Omar Abdelhady's user avatar
48 votes
2 answers
156k views

I'm working on PDF Viewer development in Angular 5. I'm done with writing HTML code for the UI part. Now I've JavaScript files that provide functionality for the UI elements. As Angular 5 supports ...
Ravi's user avatar
  • 1,878
48 votes
5 answers
30k views

I am pretty new to the world of Angular. What is the difference between CommonModule vs BrowserModule and why one should be preferred over the other?
Pritam Bohra's user avatar
  • 4,391
47 votes
3 answers
30k views

I'm building an application using the latest Angular5 and what I need is for a user to be able to switch languages. I've never had to implement this in an Angular2+ (actually I'm using Angular5). I ...
Rob's user avatar
  • 7,327
46 votes
3 answers
23k views

For a while, I was simply storing the contents of my website in a s3 bucket and could access all pages via the full url just fine. I wanted to make my website more secure by adding an SSL so I created ...
Avinash Dalvi's user avatar
46 votes
11 answers
136k views

ag-grid provides a way to get selected rows using api.getSelectedRows() function. And provides a way to set all rows using api.setRowData([]) function. I'm looking for something getAllRows() to return ...
Sandeep Kumar's user avatar
46 votes
5 answers
101k views

In AngularJS, we can listen variable change using $watch, $digest... which is no longer possible with the new versions of Angular (5, 6). In Angular, this behaviour is now part of the component ...
L Y E S  -  C H I O U K H's user avatar
45 votes
2 answers
121k views

We've just upgraded one of our applications to Angular 5, and started to transition into lettable operators as introduced in rxjs v5.5. Because of this, we have rewritten our observable pipelines to ...
Daniel B's user avatar
  • 8,879
44 votes
9 answers
168k views

I have a strange error. Usually (I did my googling), in this case of errors Angular specifies in square brackets which exactly module/service/provider/etc caused the problem. However here, it says ...
techkuz's user avatar
  • 4,041
43 votes
8 answers
87k views

I have group of toggle buttons. They are very light and disappear in the background on poor monitors with a high brightness level. How can I properly style them? I would prefer to assign them the ...
Codo's user avatar
  • 79.7k
41 votes
1 answer
63k views

I try to build an Angular 5 application with the standard ng build --prod command, and I want to set the basic API-Url in the environment.prod.ts to a value dependent on my process.env variables. ...
Freshchris's user avatar
  • 1,271
40 votes
5 answers
81k views

I am trying to add Angular Material Paginator on my app. MatPaginatorModule added in module. <mat-paginator #paginator [length]="100" [pageSize]="10" ...
Umar Farooq Aslam's user avatar

1
2 3 4 5
131