Controller Code File

#1

Hi,
I’m very new to ionic, just install it yesterday.
Want to ask a very trivial question in which file should I write JS code to get user location for example?
Regards.

#2

Hello,

typescript goes to .ts files.
For example you have a HomePage then you should have in src/pages a folder home with home.ts.
home.ts -> typescript
home.html -> html code
home.scss -> css code
home.module.ts -> module declarations when lazy loading.

On same tutorials etc you see only .ts file that includes html-code in a section.

Best regards, anna-liebt

1 Like