Skip to content

Tag: angular

How to hide a category when there are no items in it?

I have two arrays in my Angular App, one is an array of object with categories and another array with items which has an object property in it which says to which category the item belong. So i’ve made some custom pipes, one for which return all items if category “all” is selected and other …

Split Function in Angular for a certain combination

I have a string which is like this: or it can be and I want result which should split it like this: The code which I have written: which is producing result like this: What changes should I make in split() function to get the desired result? Answer You can replace rn with something else, then split by n and

Cookie value undefined in angular 6+

i am using angular and node js. i use “CookieService” package token.service.ts class trying to use token service in my streams.component.ts but i got undefined in “GetToken” here is my Streams.component.ts please help me out to solve this. Answer you just forgot to return the token