Tag Archives: javascript

AngularJS: Introduction to modules

AngularJS has its own modularity system called NgModules. They can contain components, service providers, and other code files whose scope is defined by the containing NgModule. They can import functionality that is exported from other NgModules, and export selected functionality for use by other NgModules. Every Angular app has at least one NgModule(root module) class,… Read More »

AngularJS: Building blocks of AngularJS

Angular is a framework for building client applications in HTML and TypeScript. Building blocks of AngularJS Modules Every Angular app has a root module named AppModule, which provides the bootstrap mechanism that launches the application. NgModules can import functionality from other NgModules, and allow their own functionality to be exported and used by other NgModules.… Read More »

AngularJS: Create angular application using angular-cli

Prerequisites Node.JS Install Node.JS from https://nodejs.org/en/. Check versions of node and node package manager(npm) br executing below commands:

NOTE: Angular apps depend on features and functionality provided by libraries that are available as npm packages. Install the Angular CLI You can use the Angular CLI to create projects, generate application and library code, and… Read More »

Javascript: User interaction – alert, prompt and confirm

Javascript provides some basic UI methods which are very useful in basics UI operations: alert prompt confirm ALERT: Syntax: alert(message) This method accepts one argument. It outputs a window with the message and stops execution until visitor presses “OK” button. PROMPT: This method accepts two arguments. Syntax: var result = prompt(text[, default]); It outputs a… Read More »

Javascript: Advantages and Disadvantages of Ajax

Hello friends, Here we shall discuss about some advantages and disadvantages of using AJAX. Advantages of ajax: #1) Almost supports all modern browsers #2) Reduce the traffic travels between the client and the server. #3) Response time is faster so increases performance and speed. #4) Many open source javaScript libraries available for ajax support like… Read More »

Juqery: Detect Current Mouse Coordinates

Sometimes we need to detect mouse co-ordinates. We can easily do this in Jquery like below:

If you want to do this in javascript, then do like this:

That’s all!

Javascript : Compare two dates