(Solution) TypeScript : convert an Object to Map values ?

Problem : I need to convert an object to a map to get the values of key dynamically Solution : The Map constructor takes an array of key-value pairs. Object.entries is a new Object static method available in ES2017 (19.1.2.5) If you need to support older environments and transpilation is not an option for you, […]

En Lire Plus

How to convert date into this ‘yyyy-MM-dd’ format in angular 2

If you want to convert current data into ‘yyyy-MM-dd’ format in .ts file. just see this tuto : In template: (.html) in typescript: (.ts) The date can be converted in typescript to this format ‘yyyy-MM-dd’ by using Datepipe and just add Datepipe in ‘providers’ array of app.module.ts. Like this: Read also : How to get […]

En Lire Plus