Kirtesh Shah
How to create Custom Type in Angular?

How to create Custom Type in Angular?

By Kirtesh Shah in Angular on May 13 2022
  • Jaydeep Patil
    Jun, 2022 6

    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!

    • 1
  • Pranam Bhat
    May, 2022 23

    Syntax:

    type Test = {
    name: string;
    val: string[];
    };

    Example:

    const ada: Test = {
    name: ‘Testing’,
    val: [‘xxx’, ‘yyy’, ‘zzz’]
    };

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS