Step by Step - AngularJS

Slides:



Advertisements
Similar presentations
Validation in Angular 1.3 And other angular tidbits.
Advertisements

Wireless: WDDPublic Follow along with the code: (or download the Join Me app.
Dhananjay Microsoft MVP
AJAX & By – Anupama Sharma. Defining Ajax Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together.
Create Windows ® Applications with.NET Allan Knudsen.NET Developer Evangelist Microsoft.
How to Write Unit Tests in C#
SUNY Polytechnic Institute CS 490 – Web Design, AJAX, jQueryAngularJS AngularJS is a client-side JavaScript Framework for adding interactivity to HTML.
Introduction Marko Marić, Danulabs
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
Building a UI with Zen Pat McGibbon –Sales Engineer.
Angelo Chan Kamran Bilgrami. Agenda ● WinJS - What and Why ● Modern Apps ● WinRT Architecture ● Demos o Controls o Data Bindings o Program LifeCycle Management.
An Object-Oriented Approach to Programming Logic and Design
Bob German Principal Architect A New on SharePoint Development Building Light-Weight Web Parts with AngularJS
AngularJS Services Built-in and Custom Services SoftUni Team Technical Trainers Software University
Getting Started with the ASP.NET Web API Dhananjay Kumar Infragistics Consultant Microsoft MVP
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Introduction to Angular JS Sergey Barskiy Working Class Nobody Level: Introductory.
Create Windows ® Applications with.NET Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft.
Microsoft Virtual Academy Stacey Mulcahy | Technical Evangelist Christopher Harrison | Content Developer.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 10.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
Review Class Inheritance, Abstract, Interfaces, Polymorphism, GUI (MVC)
Getting started with ASP.NET MVC Dhananjay
Introduction to Angular James Kahng. Terms Framework Template/environment constructed in the language where you fill in details with code Library Set.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
ANGULARJS A Gentle Introduction John Madison.NET User Group.
IN THIS LESSON, WE WILL BECOME FAMILIAR WITH HTML AND BEGIN CREATING A WEB PAGE IN YOUR COMPUTER HTML – the foundation.
JavaScript for C# developers Dhananjay Microsoft MVP
Simplifying the Code First Approach in the Entity Framework Dhananjay Kumar Infragistics Consultant Microsoft MVP
How to implement the Repository Pattern in an ASP.NET MVC Application Dhananjay Kumar Developer Evangelist – Infragistics Microsoft MVP
Getting Started with Angular 2 and TypeScript Nebraska.Code() 2016 Spencer Schneidenbach Ryvit.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
AngularJS. What is AngularJS  Javascript Framework  MVC  for Rich Web Application Development  by Google.
UNIT TESTING IN ANGULARJS Dhananjay
Introduction to MVC Slavomír Moroz. Revision from Previous Lesson o ASP.NET WebForms applications Abstract away HTTP (similar to desktop app development)
AngularJS By Alireza Mirian At HasinTech.. Why Angular at first place The reason something like Angular emerges: The path Web Standards have went through.
Angularjs 2.0 : Getting started
Chapter 5 Angularjs. Content Overview How to program with Angularjs Directives Expressions Controllers Filters HTML DOM Forms and Includes Ajax Scopes.
Simplifying Objects and Inheritance in JavaScript
DHTML.
Angular JS and SharePoint
Visual Studio 2017 By Michael Washington
Unit M Programming Web Pages with
Using JavaScript to Show an Alert
Extra Course
Developing GIS WebParts in SharePoint
Unit M Programming Web Pages with
Solving the Hard Problems
AngularJS A Gentle Introduction John
JavaScript: Functions.
Best Angular 2 interview questions and Answer that have been designed for Angular 2 programmers who are preparing online interviews on Angular 2 interviews question. Visit Website:
Jessica Betts, Sophia Pandey, & Ryan Amundson
Top 10 AngularJS Interview Questions Before you decide to step up and face your AngularJS Interview questions, learn about its various features to face.
Angularjs Interview Questions and Answers By Hope Tutors.
Top Reasons to Choose Angular. Angular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is.
Displaying Form Validation Info
Chapter 10 Programming Fundamentals with JavaScript
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
Introduction to AngularJS
Modern web applications
Class Diagrams.
Modern web applications
06 | Using AngularJS to create an SPA
AngularJS Michael Kang August 20th 2015.
Angular 2 : CRUD Operations
Web Client Side Technologies Raneem Qaddoura
05 | An Introduction to AngularJS
.NET Framework V3.5+ & RESTful web services
02 | Angular Controllers Stacey Mulcahy | Technical Evangelist
Presentation transcript:

Step by Step - AngularJS Dhananjay Kumar @debug_mode http://debugmode.net

Agenda Setting up Visual Studio as development environment Getting started with AngularJS $scope object and $rootScope object Controllers and nested controllers Services using service() method and factory() method CRUD operation Directives and creating basic Custom Directive Scopes in directives Isolated scope with local properties

Give Away Tweet your experience about webinar using the hashtag #Infragistics or tag @infragistics to win cool goodies from us. If you are in Delhi/NCR , join us for Infragistics Day tomorrow. Its free workshop on AngularJS in Noida

I am Dhananjay Kumar Infragistics Evangelist 6 times Microsoft MVP C-Sharp Corner Mentor @debug_mode debugmode@outlook.com http://debugmode.net

AngularJS Client side framework Single Page Application Business logic can be unit tested with ease Suitable for TDD To create dynamic web page Can we used with any server side technology

main components of AngularJS Controllers Scopes Services Directives Routing Module Views Data Binding Filters

Let us start with writing some AngularJS code

Talk to each other using $scope $scope object view controller Talk to each other using $scope

For each controller creation a new $scope gets created $scope object $scope serves as the glue between controller and the view View and the controller both have access of the $scope object $scope pass data and behaviour to the view from the controller $scope provides execution context for the DOM and the expression The $scope object is plain JavaScript object. We can add and remove property as required For each controller creation a new $scope gets created

$rootScope object $rootScope is top most scope on DOM element with ng-app directive In angular all the $scope are created with prototypal inheritance $scope has access to their parent $scope object and eventually to $rootScope object $rootScope object is parent of all the $scope object

Controller in AngularJS Controller is a JavaScript constructor functions which contains data and the business logic Controller name should start from the capital letter and ends with controller. For example AuthorController It takes $scope òbject as parameter and attach data and behaviour to the $scope object Do not use controller to manipulate DOM or create custom filter

Controller in AngularJS Each controller has its own child $scope object Whenever new controller gets created on the view angular pass a $scope object to it Controller can be attached to different level of DOM. Hence it creates $scope hierarchy $scope of the child controller can access and override data and behaviour of the parent controller

Let us write code to understand Controller and $scope object Controller Hierarchy Nested Controller

Service in AngularJS Service organize and share data and functions across the application Service provides methods to communicate data across the controllers in a consistent way Service is a singleton object and it gets instantiated only once per application using the $injector Services are lazy instantiated and gets created when angular app components need it There are many inbuilt services like $http, $q can be used as it is There are five different ways a custom service can be created

Service in AngularJS Service creation service() factory() provider() value() constant()

Let us write code to understand Services using service() method Services using factory() method Using $http service to perform AJAX operation Perform CRUD operation

Directives in AngularJS It attaches specified behaviour to existing DOM elements or create new element Directives can modify the behaviour of a particular DOM element or add new custom element on the DOM Directive name must be provided in the camel case On the view directive can be used by separating the camel case name either using dash, colon, or underscore Combination of dash, underscore or colon can also be used If directive name myFirstDirective then on the view it can be used either as my-first-directive or my:first:directive or my_first_directive or  my_first-directive or my-first:directive

Directives in AngularJS There are many built in directives available Some of them are ng-show ,ng-app,ng-controller etc

Custom Directives can be used As an attribute – set restrict value to A As a custom element – set restrict value to E As a comment – set restrict value to M As a class- set restrict value to C

Scopes in Directives Shared Scope Inherited Scope Isolated Scope

Scopes in Directives Shared Scope Inherited Scope Isolated Scope Directive shared scope with the enclosed controller It is default scope Shared Scope Directive inherit scope of the enclosed controller Inherited Scope Directive and controller has different scope Data is not shared Isolated Scope

Scopes in Directives

Isolated Scope properties

Let us write code to understand Create custom directive Using different scopes Using local scope properties in isolated scope

Q& A ?

Summary Setting up Visual Studio as development environment Getting started with AngularJS $scope object and $rootScope object Controllers and nested controllers Services using service() method and factory() method CRUD operation Directives and Creating basic Custom Directive Scopes in directives Isolated scope with local properties

What Infragistics can offer you? We welcome all of you to take advantage of a FREE 30 Day Trial by downloading the product at: http://www.infragistics.com/products/ultimate/download Please reach out to us at Sales-India@infragistics.com for any follow up questions you may have. We welcome the opportunity to assist you.