First lesson Ionic log output

Source: Internet
Author: User
Tags sql error
写程序的首要问题就是要打印日志,因为只有将日志输出才能真正了解程序的运行状态.
There are two ways of logging output

1.console output

console.log("测试一下")console.error("SQL Error - ",error);

2.alert dialog box output

alert('测试一下');
How do I see the log?

We know how to output the logs, but how can the logs be found? In fact, it is simple to run the following commands directly.

1.运行ios模拟器ionic emulate ios -lc2.运行android模拟器ionic emulate android -lc3.网页运行ionic serve -lc

Support authors continue to make better tutorials, ask the author for a cup of coffee
Support Address and Program code address

First lesson Ionic log output

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.