最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Create a javascript starter app with ionic 2 rather than a typescript app - Stack Overflow

programmeradmin1浏览0评论

I am trying to create a JS starter project but ionic start xxx --v2 creates a typescript project.

I need to create a JS starter project so I can copy across an existing JS ionic 2 app to a clean installation.

I did try renaming all of my JS files to typescript but a get a shed load of error messages of the type:

Property xxx does not exist on type yyy

I am trying to create a JS starter project but ionic start xxx --v2 creates a typescript project.

I need to create a JS starter project so I can copy across an existing JS ionic 2 app to a clean installation.

I did try renaming all of my JS files to typescript but a get a shed load of error messages of the type:

Property xxx does not exist on type yyy

Share Improve this question edited Oct 14, 2018 at 17:35 Cœur 38.7k26 gold badges202 silver badges277 bronze badges asked Jun 21, 2016 at 17:10 Bill NobleBill Noble 6,74420 gold badges77 silver badges136 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 11

Just like you can read in Ionic docs:

Ionic 2 applications are created as TypeScript by default.

Want to use JavaScript instead? Pass the --no-ts flag and get a project set up for JavaScript instead.

So you would need to run

ionic start xxx --v2 --no-ts

==============================

EDIT:

You're right. It seems to be a bug either in the documentation or in the Ionic CLI. In this commit you can see the title is remove javascript as an option for v2 projects ... and here in the last comment they mention something about updating the docs (because it says Want to use JavaScript instead? Pass the --no-ts flag and get a project set up for JavaScript instead.).

You can follow along this post to see if someone from Ionic Team answer about this issue.

=============================

EDIT 2:

Just asked in ionic-v2 Slack channel and the answer was:

We're going all in on TS.

You could do your own work and covert it toa es6 workflow, but we want people to use typescript

Here is the official answer from Ionic Team: https://forum.ionicframework.com/t/typescript-project-files-named-js/54674/16

No support for JS anymore. Only Typescript

发布评论

评论列表(0)

  1. 暂无评论