Created
February 11, 2019 11:57
-
-
Save navix/bc8fc48df1fc825d4e7f67f3c5bec0c1 to your computer and use it in GitHub Desktop.
Revisions
-
navix created this gist
Feb 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # Import JSON into Angular 7 during build #### `typings.d.ts` ```typescript declare module '*.json' { const value: any; export default value; } ``` #### `content.ts` ```typescript import * as contentRaw from './content.json'; // Declare proper types instead `any` export const content: any = contentRaw; ```