7
I created a angular design to start my learning and I am currently using Typescript to do the App. However, a question arose regarding the keyword export
(if it really is a keyword).
I used it to create a class and a array.
Class:
export class Anime {
id: number;
titulo: string;
imagem: string;
}
Array:
export const ANIMES: Anime[] = [
{ id: 1, titulo: 'Tate no Yuusha no Nariagari', imagem: 'https://myanimelist.cdn-dena.com/images/anime/1068/97169.jpg' },
{ id: 2, titulo: 'Yakusoku no Neverland', imagem: 'https://myanimelist.cdn-dena.com/images/anime/1125/96929.jpg' },
{ id: 2, titulo: 'Youjo Senki', imagem: 'https://myanimelist.cdn-dena.com/images/anime/5/82890.jpg' }
];
Note that this word is used on two occasions. Therefore, this is where my doubts arise.
Doubts
- What is the purpose of the keyword
export
? - Why use it to create arrays or classes?
- She has some relation to Angular itself?