Ionic 2 -第一篇

开发一个跨平台的app。

1.需要掌握angular 2(create Reactive Application)用来创建交互的应用。(Angular 2.包含 components、Databinding、forms、Directives、Services、Http、Dependency Injection)

2.需要掌握JS、HTML、CSS。应为ionic 2 会将Angular2 App编译成JS+HTML+CSS。

ionic 2提供组件库和方便的工具。

3.需要一台Mac 电脑。

环境配置

下载最新版本的node.js(https://nodejs.org/en/)(Node.js® is a JavaScript runtime built onChrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem,npm, is the largest ecosystem of open source libraries in the world.)

下载安装完后。在mac终端。敲如下命令:sudo npm install ionic cordova -g

创建第一个项目

第二个步骤需要耗时几分钟左右,完成后,敲如下命令:ionic start firstapp —v2

第三步也需要几分钟,可能需要翻墙。(终端显示的部分内容:Create an Ionic 2.x app in /Users/xxxxx/development/ionic2/tutorials/udemy/firstapp based on the tabs template.        Downloading:https://github.com/driftyco/ionic2-app-base/archive/master.zip  Downloading:https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip

启动第一个项目

1.接着上面的节奏,在终端敲入命令:cd firstapp //作用是切换到对应的项目路径。

2.敲如下命令:ionic serve //作用是启动app并加载到浏览器上。

3.需要等待一会,最后会加载在路径为:http://localhost:8100/的浏览器上。

未完待续。

备注:仅是自己学习过程中的一个记录整理,如果你发现有写错的内容,希望能发邮件告知,好及时纠正。 Email: ShawEleven@163.com。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容