简体   繁体   English

从离子1移动到离子2

[英]Moving from Ionic 1 to ionic 2

Trying to port my App from Ionic 1 to Ionic 2, just got a few queries: 试图将我的应用程序从Ionic 1移植到Ionic 2,只是得到了一些问题:

  1. How can I setup Push/Pop pages links so they work when they click on an image, rather than a button? 如何设置推/弹页面链接,以便它们在单击图像而不是按钮时工作?

  2. Do background images still work the same as Ionic 1, doesn't seem to work in Ionic 2? 背景图像是否仍然与Ionic 1相同,在Ionic 2中似乎不起作用?

  3. What is the correct way to paste my entire CSS from my Ionic app, rather than seperate it into bits in Ionic 2 to compile the scss files? 从Ionic应用程序粘贴我的整个CSS的正确方法是什么,而不是将其分成Ionic 2中的位来编译scss文件?

  4. How can I comment out Typescript? 我该如何评论打字稿? I have tried /* and 我试过/ *和

  5. How would my list of products currently stored in factories.js be used and imported in Ionic 2? 如何在Ionic 2中使用和导入当前存储在factories.js中的产品列表? jsfiddle(dot)net/vgthumsm/ 的jsfiddle(点)净/ vgthumsm /

  6. Where does controller code and then the JS functions underneath get pasted into the .ts file? 控制器代码和下面的JS函数在哪里粘贴到.ts文件中? jsfiddle(dot)net/qov7bh0w/ 的jsfiddle(点)净/ qov7bh0w /

  1. In order to push (or pop) a page on the NavController stack, you would need to respond to some event to do it in code AFAIK. 为了在NavController堆栈上推送(或弹出)页面,您需要响应某些事件以在代码AFAIK中执行此操作。

  2. Background images should work fine using CSS. 使用CSS可以很好地处理背景图像。

  3. app/theme/app.core.scss is your best bet app/theme/app.core.scss是你最好的选择

  4. Comments work the same as javascript comments. 评论的工作方式与javascript评论相同。

// this line is commented /* commented out stuff on several lines */

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

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