Questions tagged [angular5]

Questions about Angular version 5, the web framework from Google. Use this tag for Angular questions which are specific to only version 5. Use tag Angular for any Angular questions which are not specific to an individual version.

Questions about Angular version 5, the web framework from Google.

You can read more about Angular version 5 here

You can find Angular version 5 official documents here

6545 questions
2
votes
3 answers

angular ng2 file upload issue

I am trying to upload different documents. But the problem comes when i choose a file 2nd time it gets added to fileArray, it don't get replaced. For example, i have choosen a picture for 1st input. Then i decided to choose different picture for the…
Farhan
  • 751
  • 1
  • 9
  • 17
2
votes
4 answers

unable to setAttribute disabled using renderer2 on angular material select

I am not able to disable the select dropdown of angular material using the renderer2. Below is my code Component.html
Ravi Yadav
  • 637
  • 1
  • 9
  • 21
2
votes
3 answers

angular 5 display nested questions and answer show item under it parent item

this is my server response for quetions and answers.. its a array. [ { "id": 1, "product": 1, "user": "alex", "text": "is it ok?", "parent_id": null, }, { "id": 2, "product": 1, …
devmrh
  • 1,171
  • 4
  • 19
  • 46
2
votes
1 answer

Angular 2 change detection - refreshing DOM even though nothing has changed

I have built an application, which is LIVE in beta, and I am now trying to optimize it's performance. I have a case, where there is a table with images and I noticed that the images keep flickering, which made me look under the hood and I noticed…
2
votes
3 answers

get user role from database based on user id in angular

I am using an "auth service" to keep all the user authentication functions. When the user is authenticated, I get the user's id and I fetch the relevant record from the database table, but I fail to get the value of the "role" field. The code I am…
Elias
  • 347
  • 2
  • 5
  • 20
2
votes
2 answers

Angular 5 - How to ignore updating one property of Observable

I'm developing a page to show some videos and user can like them. Videos and Likes are saved in a database and I used two angular services for set and get data. My problem is about setting and revoking likes on videos. after every request for set or…
Mahmood Kohansal
  • 1,021
  • 2
  • 16
  • 42
2
votes
2 answers

AsyncPipe in *ngIf

I am trying to show one of the headers according to the value of isComplex$ observable in *ngIf:
Hikmat G.
  • 2,591
  • 1
  • 20
  • 40
2
votes
1 answer

Angular 5&6 testing error: Could not load the summary for directive AppComponent

Upon running ng test, I get an error stating: Error: Illegal state: Could not load the summary for directive AppComponent. I'm not sure why I'm getting this error, as I'm referencing and declaring AppComponent. This is my app.component.spec.ts …
Kars Barendrecht
  • 549
  • 10
  • 23
2
votes
3 answers

Array of object showing undefined duing ngOninit in angular 5

Even when I am trying to access inside html like this, its also not giving any value {{ link.name }} Here is my JSON [{"id":215,"name":"Book…
mjck
  • 187
  • 3
  • 5
  • 18
2
votes
0 answers

Materializecss angular 5 dropdown content dynamic generation throws error

When I generate dynamic content with different dropdowns the dropdown throws an error. If I do not generate dynamic dropdown content it works, the problem is with that generation. It throws this error: ERROR TypeError: Cannot set property 'tabIndex'…
dmance
  • 628
  • 1
  • 8
  • 26
2
votes
4 answers

How to I get current time from angular material Date picker?

I am using angular material datepicker https://material.angular.io/components/select/overview but this returns only the date and not the current time : Mon May 28 2018 00:00:00 GMT+0530 (IST) Is there any way I can get the current time also from…
ian dsouza
  • 187
  • 2
  • 4
  • 14
2
votes
0 answers

How to view file in new tab with angular js 5?

I am trying to view file in browser in new tab but in service i am not getting any response and it is throwing me in catch handler of my service and in handler i am not getting any specific error to troubleshoot the problem. I am sending…
2
votes
1 answer

Download file with Angular frontend from Java backend

I can't figure out how to download a file from the API using Angular. I sending a Blob from the backend but I don't think I convert it the right way since it gives me a serialization error. A bytearray however does give me the content of it but not…
Sinan Samet
  • 6,432
  • 12
  • 50
  • 93
2
votes
1 answer

How to use ng2-signalr

I am trying to use signalr in angular. I have a working hub in c# with a function called Hello public class myHub : Hub { public void Hello(string msg) { Console.WriteLine("HIIII" + msg); } } I am using angular 5 and the package…
Yedidya kfir
  • 1,419
  • 3
  • 17
  • 32
2
votes
0 answers

Interface, Angular 5, Reactive Form

I have created an interface for login and getting and error when I am trying to compile it error :Type 'FormGroup' is not assignable to type 'IAuth'. Property 'email' is missing in type 'FormGroup' auth.ts export interface IAuth{ email :…