Angular

Fix lint errors in Angular cli

The mind, once stretched by a new idea, never regains its original dimensions. Problem:- In Angular cli after executing the command ng lint shows a lot of lint errors based on the configuration `tslint.json`, how to fix lint errors ? Solution:- Run the below command tslint –fix src/**/*.ts -t verbose Note:– It will fix most of the […]

Posted in Javascript | Tagged | Leave a comment

Creating your first app using Angular.io

Do something today that your future self will thank you for We have created this tutorial to make you up and running with Angular.io in 10 minutes. This is not a very detailed tutorial incase you are not familiar with Angular basics, please refer Angular.io documentation to get more details on the core concepts.Expectation:- We’ll create our […]

Posted in Javascript | Tagged | Leave a comment

Reading JSON data in Angular JS (Part-1)

Scenario: – How to fetch JSON data from backend into User Interface (UI) of application using Angular JS? Solution:- We have divided our solution approach into 2 parts; in part-1, tutorial we would fetch the data in a straight flow, without thinking about the framework level things. Flow:- Code:- Download from GitHub JS File //Creat […]

Posted in Javascript, Uncategorized | Tagged | 1 Comment

Difference between {{}} and ng-bind in AngularJS

To bind our data to the HTML page, Angular gives the ability to use {{}} known as double curly brackets or ng-bind.Both ways are performing the same functionality.   {{}}   Example:-       name is JS object or some variable we are referring to. It makes your template very readable i.e Anyone going through […]

Posted in Javascript | Tagged | Leave a comment

XMLHttpRequest Cannot Load error in AngularJS

Error:- XMLhttpRequest Cannot load ? How to handle this error.   Browser Error Solution:- This is common error when you attempt to open load files directly in chrome. Reason, Chrome and other browsers have imposed security restrictions for “Cross Origin Requests“, which means that you cannot load the files directly from your local hard-disk to […]

Posted in Javascript | Tagged | Leave a comment

Conditional display of elements/data using Angular Js Directives.

Today we would learn frequently used Angular JS directives.   Problem:- How to achieve conditional construct in Angular js?   Solution:- We would achieve it by using built in directives of Angular JS. 1. ng-Switch:-We can control the conditional display of data. It is similar to Switch-Case in JavaScript. JavaScript syntax:- Switch(expression) { Case n: […]

Posted in Javascript | Tagged | Leave a comment

How to optimize the performance of ng-repeat in AngularJS?

Today we would focus on improving the performance of Angular JS code by learning the basics of ng-repeat and then how to enhance its capabilities. Follow us for more learning Fb,G+,Twitter. ng-repeat :-  It is directive which create instant of template for each item in the collection. It is identical to looping concept in any language […]

Posted in Javascript | Tagged | Leave a comment

AngularJS $watch() ,$digest() and $apply()

This post is meant for novice AngularJS programmers to enlighten them with basic comprehension of how data-binding works. To deep-dive into data-binding, you need a clear vision of how $watch(), $digest(), $apply() and dirty checking works.Lets go step by step on this topic.Do folow us on FB page, Twitter or G+ for more updates and learning.“It is not about doing so […]

Posted in Javascript, Uncategorized | Tagged | Leave a comment

AngularJS Interview Questions-Set1

Here comes our first set of Interview questions on Angular JS. Hope it assist the job aspirants to crack the interviews.Do like our Facebook page or follow on Twitter for more questions.It is said “The end justifies the beginning” ,so begin right,prepare well for the interview and crack it. Cracking Angular JS  1.What is AngularJS?AngularJS […]

Posted in Javascript | Tagged | Leave a comment

Tooltip that follows cursor using Directive in AngularJS

How to create a custom tooltip using Directive in AngularJS? Scenario: – Today our target is to create a tooltip which is visible on mouseover an HTML element. Approach: –  We would utilize “Directive” methodology of Angular JS in achieving this. Incase You like our tutorial, please help us to share it with others, do like our FB […]

Posted in Javascript | Tagged | 3 Comments