Dhananjay Microsoft MVP

Slides:



Advertisements
Similar presentations
AJAX Development By Gary Mandela December 26,
Advertisements

Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
Validation in Angular 1.3 And other angular tidbits.
Wireless: WDDPublic Follow along with the code: (or download the Join Me app.
2007 Adobe Systems Incorporated. All Rights Reserved. 1 Glenda Vigoreaux Adobe Certified Instructor roundpeg, Inc. Component Development.
Programming with Objects: Class Libraries and Reusable Code.
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.
@lestersconyers #spsevents #spsphx SPS EVENTS PHX SharePoint and Angular Sitting in a Tree… LESTER SCONYERS.
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.
Chapter 15 – Inheritance, Virtual Functions, and Polymorphism
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.
Tutorial 2 Variables and Objects. Working with Variables and Objects Variables (or identifiers) –Values stored in computer memory locations –Value can.
AngularJS Directives Defining Custom Directives SoftUni Team Technical Trainers Software University
JavaScript, Fourth Edition
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
XRules An XML Business Rules Language Introduction Copyright © Waleed Abdulla All rights reserved. August 2004.
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.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Review Class Inheritance, Abstract, Interfaces, Polymorphism, GUI (MVC)
Getting started with ASP.NET MVC Dhananjay
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
SQL Unit Test Editor WinForm App T-SQL Script Dom Assemblies SQL Unit Test Framework Definition files for customization T-SQL from App SQL Profiler Trace.
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.
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
Chapter 1 Ionic Framework (overview) Front-end framework for developing hybrid mobile apps with HTML5 Yeunyong Kantanet School of Information and Communication.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Getting Started with Angular 2 and TypeScript Nebraska.Code() 2016 Spencer Schneidenbach Ryvit.
Preliminary Software design and Development a Welcome to our Coding Day session one.
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
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.
AngularJS Best Practices High Quality SPA Applications SoftUni Team Technical Trainers Software University
UNIT TESTING IN ANGULARJS Dhananjay
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
Visual Studio 2017 By Michael Washington
Extra Course
Developing GIS WebParts in SharePoint
AngularJS A Gentle Introduction John
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
MEAN stack L. Grewe.
Step by Step - AngularJS
Introduction to AngularJS
Angular 2 : CRUD Operations
.NET Framework V3.5+ & RESTful web services
02 | Angular Controllers Stacey Mulcahy | Technical Evangelist
Presentation transcript:

Dhananjay Kumar @debug_mode Microsoft MVP http://debugmode.net AngularJS Dhananjay Kumar @debug_mode Microsoft MVP http://debugmode.net

Agenda : 60 to 80 minutes 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

I am Dhananjay Kumar 5 times Microsoft MVP Infragistics Consultant @debug_mode Blog : 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 and 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 and 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 Any license purchases on or before 4/30/15 entitles you to take advantage of a 10% discount if you attended this webinar session today! 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.