Skip to content

Tag: angular

Angular Http Subscribe not working

Hi In my Angular Component, i have this code in one of my methods In network tab in chrome dev inspector i saw that my get call returning result, but data is undefined. Why? Answer The reason it was not working originally, is because you had this: You are not returning a value. When you use the curly braces, …

How to manage datetime in angular

I’m working with Angular(v5). I have some problem with Datetime. I need the current time and I have to save it in a variable. After that I have to subtract an interval of hours (8 hours or an hour) and save the result in a variable and then do it withconsole.log. I need the format to be: YYYY-MM-DD HH:m…

Angular 2/4 String Comparison with Ignore Case

I’m comparing a number of fields in an Angular 2 template and it works for same case properties but returns false for the same string on different cases. Is there a way to make it case insensitive perhaps through a simple pipe? Answer You should use === with toLowercase()