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

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

问题描述

我是离子领域的新手.我在某些离子项目中发现,没有src(应用程序和页面)文件夹,而只有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天全站免登陆