Difference between angular-route and angular-ui-router

Published on

Difference between angular-route and angular-ui-router ui-router is a 3rd-party module and is very powerful. It supports everything the normal ngRoute can do as well as many extra functions. Here are some common reason ui-router is chosen over ngRoute: ui-router allows for nested views and multiple named views. This is very useful with larger app where … Continue reading Difference between angular-route and angular-ui-router

Understanding AngularJS Factory and Service

Published on

AngularJS service vs factory – with example, Understanding AngularJS Factory and Service. What is an AngularJS service or factory? What is an AngularJS service or factory? Singleton. Yes! That one word is enough to define AngularJS services. The purpose of AngularJS service / factory function is to generate a single object or function that represents the service to … Continue reading Understanding AngularJS Factory and Service

How do JavaScript closures work?

Published on

How do JavaScript closures work? How to understand closures in Javascript? What is a closure in javascript? Understand JavaScript Closures With Ease. How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? JavaScript Closures for Beginners … Continue reading How do JavaScript closures work?

How to convert Highlighted or Selected text to speech

Published on

How to convert Highlighted or Selected text to speech? Text to speech in HTML5 ,JavaScript which runs on all browser. Selected text to speech which runs on all browser.Text to speech using Javascript.Text to speech using jquery. HTML: <!DOCTYPE html> <html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta charset=”utf-8″ /> <script> var text = ”; function gText(e) { text … Continue reading How to convert Highlighted or Selected text to speech

How to get the Highlighted/Selected text in a paragraph of a website

Published on

How to get the Highlighted/Selected text in a paragraph of a website using Javascript? On Text Highlight Event? Getting the text the user has selected is relatively simple. There’s no benefit to be gained by involving jQuery since you need nothing other than the window and document objects. function getSelectionText() { var text = “”; … Continue reading How to get the Highlighted/Selected text in a paragraph of a website

Trying to Run “npm start” fails due to some error

Published on

Trying to run “npm start” fails due to some error. npm ERR! Failed at the angular-quickstart@1.0.0 start script   In package.json, I changed “@types/selenium-webdriver”: “^2.53.33” to “@types/selenium-webdriver”: “2.53.33” It compiles the TypeScript now. Looks like there was an update published today that broke something. https://www.npmjs.com/package/@types/selenium-webdriver