Angular2 equivalent for angular.version in AngularJS - angularjs

In the browser's developer console (press F12 to open it), typing the following
"angular.version" will give the version of AngularJS APP loaded on page.
Is there an equivalent of it for Angular2.

There is no equivalent console command, but you can use the following:
getAllAngularRootElements()[0]['attributes'][1];

Related

React app showing blank page in GitHub pages

After uploading my react app on gitHub pages its showing a blank page, and there is no error displaying in console. When I inspected the pages it says:
You need to enable javascript to run this page
but when I checked by browser settings it shows my javascript is enabled.
Here is my console
Here are the elements
Here is the Package.json
Also when I tested with a basic react app(no routes only single page) it was displaying properly
If gitHub is not publishing, is there any other alternative to publish my work?
Thanks
It looks good from my side. You should try with another browser to see if the problem persists.

Angular JS Debug Logs

I wrote few logs in my angular js application using the code below. However I am unable to see it displayed either in the console or (chrome -> dev tools) browser console. Where can I see the logs displayed?
console.info(' Maintanence !! ');
console.info(' Next Event = '+ next.name);
use console.log('Maintanence !!');

How to show console.log() in code in Terminal from web extension firefox?

In Web extension Firefox :
How to show or enable console.log() in my code in the terminal , I used "we-ext run -v" command but it show logs of web extension framework not my logs in my code ?
Are you sure your setup is right? For me, console.log() messages are shown in both, browser console and web console.

Error URL pdfMake.js with Ionic Cordova App

I have a problem using pdfMake.js library. This library is supposed to generate PDF, client-side only.
It works well with chrome, Firefox...
But when I launch my ionic app on a device (Android in my case), I have the following error :
CordovaWebViewImpl﹕ Blocked (possibly sub-frame) navigation to non-allowed URL: data:application/pdf;base64,JVBERi0xLjMKJf39/f0KNiAwIG9iago8PAovVHlwZSAvRXh0R1.......
I encountered this problem before with AngularJs for example for Blobs...and using the following configuration worked :
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|blob):/);
BUT not here... :(
Do you have any idea how to allow the data/pdf ?
Thanks !
You have to add permissions to your App inside manifest.xml file

AngularJS set up with Webstorm

I'm getting started with Angularjs and fallen at the first hurdle :-(
i've installed node (windows installer) and the webstorm ide. in webstorm i've installed the angularjs plugin and in the html typing 'ng' prompts all the ng templates in a dropdown, so this look ok.
cutting and pasting in the demo html5 (under the heading 'The Basics' at http://angularjs.org/) and running in webstorm and navigating to the file url (in firefox or chrome) however the angular statement '{{yourName}}' isn't binding at all - it's rendered out as a literal. Anyone know where i'm going wrong ?
The example on the home page was using protocol-less (or protocol-relative) URLs (http://www.paulirish.com/2010/the-protocol-relative-url/). While those are very handy, protocol-relative URLs don't play nicely with the file:// protocol in this case. Simply your browser is trying to retrieve AngularJS library from the local file system. To fix it you need to add protocol:
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
Try prefixing the ng tag with data like data-ng-model.

Resources