Ionic2文件夹结构缺少app文件夹 [英] Ionic2 folder structure missing app folder

查看:257
本文介绍了Ionic2文件夹结构缺少app文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始学习Ionic2,我已经用离子启动myproject空白--v2 创建了一个新的空项目,如果我做<$ c $,一切正常c> ionic serve 。

I'm starting to learn Ionic2, I have create a new empty project with ionic start myproject blank --v2 and everything works correctly if I do ionic serve.

然后我读了这个教程和许多其他人。所有这些都表明离子文件夹结构应该有一个 app 文件夹:

Then I read this tutorial and many others. All of them state that the ionic folder structure should have an app folder:

如果我查看我的项目文件夹结构我看不到任何app文件夹。我的结构看起来如此:

If I look at my project folder structure I can't see any app folder. My structure looks so:

- hooks
- plugins
- scss
- www
  -index.html  
  - css
  - img 
  - js
  - lib
- bower.json
- config.xml
- gulpfile.js
- ionic.project
- package.json

现在我想关注这个教程是为了构建我的第一个应用程序,但正如你可以看到该示例的文件夹结构与我的不同,作为一个离子初学者,我有点困惑。

Now I'd like to follow this tutorial in order to build my first application but as you can see the folder structure of that example is different from mine and as an Ionic beginner I'm a little confused.

FIY(如果重要的话):

FIY (if it matters):

我指的是页面的模板。

cordova -v: 6.2.0
ionic -v: 1.7.15


推荐答案

可能是因为你的Node.js需要更新。

It might because your Node.js needs update.

首先在终端中使用 node --version (如果你使用的是Mac)来检查你的Node.js的版本。当我的Mac中的节点版本是v5.10.1并使用 brew升级节点将我的Node.js升级到v6.3.1时,我遇到了同样的问题。

First use node --version in your terminal (if you use Mac) to check the version of your Node.js. I had the same problem with you when node version in my Mac was v5.10.1 and solved it by using brew upgrade node to upgrade my Node.js to v6.3.1.

将Node.js更新到最新版本后,只需使用 ionic start myProject --v2 创建一个新项目然后你创建的新项目应该有/ app里面。

After updating your Node.js to the latest version just use ionic start myProject --v2 to create a new project and then the new project you created should have /app inside.

这篇关于Ionic2文件夹结构缺少app文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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