是否可以在Ionic 3 CLI中创建Ionic 2项目 [英] Is it possible to create Ionic 2 project in Ionic 3 CLI

查看:337
本文介绍了是否可以在Ionic 3 CLI中创建Ionic 2项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做时,我收到以下消息:

When I do this, I get the message below:

命令:

ionic start blank myapp --v2

错误:


[错误]抱歉! --v1和--v2标志已被删除。
使用--type选项。 (离子启动 - 帮助)
对于Ionic Angular项目,尝试离子启动空白myapp --type = ionic-angular

[ERROR] Sorry! The --v1 and --v2 flags have been removed. Use the --type option. (ionic start --help) For Ionic Angular projects, try ionic start blank myapp --type=ionic-angular

我的Ionic CLI版本是:

My Ionic CLI version is :

ionic -v
3.3.0


推荐答案

更新2:您无法再在Ionic中创建Ionic 2项目3 CLI。

Update 2 : You can no longer create Ionic 2 project in Ionic 3 CLI.

由于Ionic 2未更新&使用Ionic 3重写,它使用Angular 4.

As Ionic 2 was not updated & is rewritten using Ionic 3, which uses Angular 4.

因此,如果您创建新的Ionic项目,它将默认使用Ionic 3。

So if you create new Ionic project it will use Ionic 3 by default.

更新1: 更多信息在这里可用

随着更新,语法也做了很少的改变:

With the updates few changes are done in syntax as well :

创建一个新项目:(你有3个模板可用于Ionic,即空白,标签,侧面菜单)

To create a new project : (You have 3 templates available with Ionic i.e. blank, tabs, sidemenu)



  1. ionic start {{AppName}} {{TemplateName}} ==>最新的Ionic代码库项目

  2. ionic start {{AppName}} {{ TemplateName}} --type ionic1 ==> Ionic v1 project







是的,您可以查看此链接


ionic start [app-name] [template] --type = ionic1

ionic start [app-name] [template] --type=ionic1

离子启动[app-name] [template] --type = ionic2

ionic start [app-name] [template] --type=ionic2

离子启动[app-name] [template] --type = ionic-angular

ionic start [app-name] [template] --type=ionic-angular

我现在有离子-v 2.2.2所以无法测试它,所以请尽量让我知道;)

I have ionic -v 2.2.2 right now so couldn't test it, so please try and let me know ;)

这篇关于是否可以在Ionic 3 CLI中创建Ionic 2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆