离子项目中文件夹 www、page、src 的作用是什么? [英] what is the roles of folder www, page, src in an ionic project?

查看:34
本文介绍了离子项目中文件夹 www、page、src 的作用是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是离子新手.我在一些离子项目中发现,没有 src(app & pages) 文件夹,而只有 www 文件夹.在检查了一些示例离子项目后,似乎 src 文件夹包含与 www 文件夹类似的组件.

I am new in ionic. I found in some ionic project, there is no src(app & pages) folder, but only is www folder. After checking some sample ionic projects, it seems the src folder contents the similar components as www folder.

能否请您解释一下这些文件夹之间的区别,它们可以一起使用吗?如果有关于离子框架架构的详细介绍,将不胜感激.

Could you please explain the differences between these folders, are they can be used together? If there is some detailed introduction for ionic framework architecture, it will be really appreciated.

推荐答案

src 文件夹包含未编译的原始代码,以及构建应用程序需要编辑的文件.它将包含您的所有页面、组件、管道、服务、主题、资产、图像.

The src folder contains your raw, uncompiled code, the files you need to edit in order to build your app. It'll hold all your pages, components, pipes, services, themes, assets, images.

www 只是您的编译代码,每次构建项目时,www 内容都会被擦除并重新构建,因此无需更改此文件夹中的任何内容.如果您想为 Web 部署,其中一种方法是使用 www 文件夹中的代码.

The www is simply your compiled code, every time you build your project the www content is erased and built again, so there's no need to change anything in this folder. If you want to deploy for web one of the ways is using the code that's inside www folder.

你找到的没有 src 文件夹的项目一定是 ionic 2 的早期版本,我记得 ionic 2 rc6 已经在使用 src 文件夹,所以这个项目使用的是 2016 年 11 月之前发布的版本.

The project you've found with no src folder must be an early version of ionic 2, i remember ionic 2 rc6 was already using src folder, so this project is using a version released before November 2016.

您可以在此处了解有关结构的更多信息.

You can learn more about the structure here.

希望这会有所帮助.

这篇关于离子项目中文件夹 www、page、src 的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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