Tutorial by Examples: angularjs

In Angular $scope is the glue between the Controller and the View that helps with all of our data binding needs. Controller As is another way of binding controller and view and is mostly recommended to use. Basically these are the two controller constructs in Angular (i.e $scope and Controller As). ...
The components in angularJS can be visualised as a custom directive (< html > this in an HTML directive, and something like this will be a custom directive < ANYTHING >). A component contains a view and a controller. Controller contains the business logic which is binded with an view , w...
// thecontroller.js $scope.sendVerifyEmail = function() { console.log('Email sent, whaaaaam!'); currentAuth.sendEmailVerification(); } // where currentAuth came from something like this: // routerconfig .... templateUrl: 'bla.html', resolve: { currentAuth:['Auth', functio...
Session storage service : Common factory service that will save and return the saved session data based on the key. 'use strict'; /** * @ngdoc factory * @name app.factory:storageService * @description This function will communicate with HTML5 sessionStorage via Factory Service. */ a...
There are a lot of good video tutorials for the AngularJS framework on egghead.io https://egghead.io/courses/angularjs-app-from-scratch-getting-started https://egghead.io/courses/angularjs-application-architecture https://egghead.io/courses/angular-material-introduction https://egghead.io/co...
Below is the list of some mistakes that developers often make during the use of AngularJS functionalities, some learned lessons and solutions to them. 1. Manipulating DOM through the controller It's legal, but must be avoided. Controllers are the places where you define your dependencies, bind you...
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script> CORS with Windows Authentication test (Angular) <script type="text/javascript"> var app = angular.module('myApp', []); app.c...
You can load AngularJS services in vanilla JavaScript using AngularJS injector() method. Every jqLite element retrieved calling angular.element() has a method injector() that can be used to retrieve the injector. var service; var serviceName = 'myService'; var ngAppElement = angular.element(do...
In the new Angular framework, Components are the main building blocks that compose the user interface. So one of the first steps that helps an AngularJS app to be migrated to the new Angular is to refactor it into a more component-oriented structure. Components were also introduced in the old Angu...
step 1: Create Project - Application - app.js - Controllers - appController.js - Factories - SignalR-factory.js - index.html - Scripts - angular.js - jquery.js - jquery.signalR.min.js - Hubs SignalR version use: signalR-2.2.1 Step 2: Startu...
This sample demonstrates the use of AD B2C for securing an AngularJS based web and mobile app. Refer https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Azure AD B2C Azure AD B2C is a cloud identity management solution for your web and mobile applications. It is a highly available global...
Refer the example in https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Web app implementation uses Hello.js that performs identity management with Azure AD B2C . Hello.js is a client-side JavaScript SDK for authenticating with OAuth2 web services and querying REST APIs. jwtHelper of ang...
<div ng-app="MainApp" ng-controller="SampleController"> <input ng-model="dishName" id="search" class="form-control" placeholder="Filter text"> <ul> <li dir-paginate="dish in dishes | filter : di...
ng-repeat is the built-in directive provided by AngularJS, mostly used for listing the array elements on UI dynamically as per the changes in our model. Official "ng-repeat" docs can be found at : https://docs.angularjs.org/api/ng/directive/ngRepeat Also the most common error faced whil...

Page 1 of 1