How to create Custom Type in Angular?
According to Angular guidelines if you have a large template then you will use templateurl and put external file path into the component. For example- If you have template code for perticular component is more than 5 to 6 lines then you will go with templateurl and put external html template file path and if you have wanna do some small thing with template like displaying message and something like that then go with template only. Thanks!
Syntax:
type Test = { name: string; val: string[];};
Example:
const ada: Test = { name: ‘Testing’, val: [‘xxx’, ‘yyy’, ‘zzz’]};