Angular

cannot find module consider using '--resolvejsonmodule' to import module with json extension angular

cannot find module consider using '--resolvejsonmodule' to import module with json extension angular, someone asked me to explain?
I got this following error "cannot find module consider using '--resolvejsonmodule' to import module with json extension angular" while tried to import the json file in the component.
import module with json extension angular error
To solve this error, we need to create a file named 'json-typings.d.ts' in app root folder and add this code.

declare module "*.json" {
    const value: any;
    export default value;
 }

Post your comments / questions