Skip to content

Tag: angular

Angular: Type string is not assignable to type date

In Angular, I wrote a code as below. FYI, the type of created_date is Date. However, in here, I see the error as – type ‘string’ is not assignable to type ‘date’. If I amend new Date before the formatDate(…) then I see the unwanted result. How can I get the result with the …

Image didn’t appear in my angular project

I am learning angular by following steps in a book and there’s a task that demanded creating a product component like in Amazon.For each product, we have an image, the product name, the product release date, the rating component and the number of ratings it has. I followed all steps but the image didn&#…

Angular Nested Child Routing

I am learning use of multiple router-outlet. While using navigateBy function of router, i am not able to view my child route and getting error. But if i access it via routerLink in html i get the desired output. So in below code, navigation to songs is working , but navigation to films is not. App Component h…