Is someone can tell me in wich file I have to write the export class declaration ? Should I write it in a JS file (directive, service…?), I’m confused !
Hi, yes I’m a newbie… ^^’ Thanks for your quick answer !
Mmh… So I tried to write the code below in “directive.js” (doesn’t work), then in “service.js” (doesn’t work too), should I create a specific file for this ?
Thanks for that link, it was really helpful. But, my question wasn’t enough clear I guess, my problem is that I fully work with ionic creator, and in that workspace I would like to know how to manage new classes, component…etc.
Because in ionic creator, when you start a new project you already have a sort of organisation in code section :
pages
other JS files (“directive.js” and “service.js”)
HTML templates
But nowhere there is a specific field for “.ts” files…So I’m still a bit confused between the things ionic framework can handled and ionic creator can.
actually .ts files mean typescript files, which is a super set od javascript,
in a plain words it is an advancement of js files
for further please read this thread
if you create a project for ionic 2 you are able to see the ts files
go through this basics of ionic2