Category: Angularjs

12 Oct by vichu

Uploading an image using Angular

Reading Time: 2 minutesHi Everyone, From the day I started writing the code of How to upload files using Angularjs and spring mvc, many started asking me to write up for uploading in Angular ( Don’t call it as Angular 2, Angular 4 etc. Its just called Angular ). So I am writing this post of uploading an […]
7 Sep by vichu Tags: , ,

Game – Guess The Number – Angular

Reading Time: 3 minutesLets start playing an angular game. Demo This game is to guess the computer generated random number between 1 and 100. If you enter a number that is more than the actual number then you will get an alert stating “Your number is higher”. If it is lower than actual then you will get “Your […]
8 Aug by vichu Tags: ,

Angular 2 and Above – Getting Started

Reading Time: 2 minutesMany started asking me to create a project in angular 2 and above. I thought of creating a separate end to end with demo mainly focusing on angular 2 and above as it is a complete rewrite from the beginning. Here there are more detailed information related to a complete picture of angular. You can […]
12 Jun by vichu

$watch in AngularJS

Reading Time: 3 minutesA watcher monitors model changes and takes action in response. The $scope object has a function $watch() that’s used to register a watcher. Let’s modify our previous snippet. We want to give users the ability to add a book to their wish list. But once they add two books to their wish list we want […]
26 Sep by vichu Tags: ,

#13 – Fetching Data with $http Using GET

Reading Time: 4 minutesThe traditional way of making a request to the server from AJAX applications (using XMLHttpRequests) involves getting a handle on the XMLHttpRequest object, making the request, reading the response, checking the error codes, and finally processing the server response. It goes something like this: var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readystate […]
22 Sep by vichu Tags: ,

#11 – Building a custom AngularJS Service

Reading Time: 3 minutesWe saw how to use AngularJS services through the use of some built-in AngularJS services. We will be using the ones previously mentioned extensively throughout the blog going forward, so don’t worry that we didn’t get to see them all in action yet. The core AngularJS services only touch the tip of the iceberg in […]
18 Sep by vichu Tags: , ,

Dependency Injection and in-built services

Reading Time: 9 minutesDependency Injection in AngularJS The entire service concept in AngularJS is heavily dependent on and driven by its Dependency Injection system. Any service known to AngularJS (internal or our own) can be simply injected into any other service, directive, or controller by stating it as a dependency. AngularJS will automatically figure out what the service […]