How to watch console.logs in ionic emulator?

Just enable the console logs in the emulator. Here my example: > ionic emulate ios –livereload Setup Live Reload Running dev server: http://localhost:8100 Adding in default Ionic hooks Running live reload server: http://localhost:35729 Watching : [ ‘www/**/*’, ‘!www/lib/**/*’ ] Ionic server commands, enter: restart or r to restart the client app from the root goto …

Read more

How to console.log an object definition and a text in same string?

console.log accepts any number of parameters, so just send each piece as its own param. That way you keep the formatting of the object in the console, and its all on one entry. var obj = { query: ‘wordOfTheDay’, title: ‘Frog’, url: ‘/img/picture.jpg’ }; console.log( “Text Here”, obj); // Text Here Object {query: “wordOfTheDay”, title: …

Read more

JavaScript – adding style to the text of console log [duplicate]

Addy Osmani has a good explanation: https://plus.google.com/+AddyOsmani/posts/TanDFKEN9Kn (archive.org) Styled console logging in the Chrome DevTools (Canary) Thanks to Mr. +Mike West, you can now add style to your console log via %c, just like you can in Firebug. e.g console.log(“%cBlue!”, “color: blue;”); Blocks such as console.log(‘%cBlue! %cRed!’, ‘color: blue;’, ‘color: red;’); are also now supported …

Read more