简体   繁体   English

Ionic 2的语言是什么

[英]What is the language Ionic 2 is built on

ionic 2背后的编程语言是什么,在github上我只能看到ionic 2标签的css类,而不是标签的实际代码,在哪里我可以找到它,ionic 2标签的实现

Ionic 2 is built using Typescript (same as Angular 2) and Sass. Ionic 2使用Typescript(与Angular 2相同)和Sass构建。 We have found that Typescript is really great for open-source development since the compiler and static types eliminate an entire class of potential issues. 我们发现Typescript对于开源开发确实非常有用,因为编译器和静态类型消除了整个潜在问题。

Ionic 2 will support traditional 'desktop' web, mobile web/progressive web apps, hybrid apps like Ionic 2, and even hybrid 'desktop' apps via Electron. Ionic 2将通过Electron支持传统的“桌面”网络,移动Web /渐进式Web应用程序,Ionic 2等混合应用程序,甚至是混合的“桌面”应用程序。

Ionic runs within Apache Cordova (PhoneGap). Ionic在Apache Cordova (PhoneGap)中运行。 Ionic is a combination of javascript, html and css files written for you, so that you don't have to write them yourself and concentrate on your application. Ionic是为您编写的javascript,html和css文件的组合,因此您不必自己编写它们并专注于您的应用程序。

So, basically you want to learn in what programming language Cordova has been written? 因此,基本上,您想学习用哪种编程语言Cordova编写? As you can see on GitHub , it uses different languages for different platforms. 如您在GitHub上所见 ,它为不同的平台使用不同的语言。 Mostly Objective-C for iOS, Java for Android, etc. 主要是iOS的Objective-C,Android的Java等。

Ionic2 is written using TypeScript and Sass. Ionic2是使用TypeScript和Sass编写的。 It also leverages elements (Component, Directive, ...) and mechanisms provided by Angular2. 它还利用了Angular2提供的元素(组件,指令等)和机制。

The source code of the framework can be reached in Github: https://github.com/driftyco/ionic/tree/2.0/ionic . 框架的源代码可以在Github中找到: https//github.com/driftyco/ionic/tree/2.0/ionic

If you look for the source code of components, you could have a look at the components folder. 如果您查找组件的源代码,则可以查看components文件夹。

For example for tabs, here is the corresponding TypeScript source code: 例如,对于选项卡,以下是相应的TypeScript源代码:

And the SASS one: 和SASS之一:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM