Get satrted angular js

59
WorkShop Getting Start With ANGULAR 2015, Alexandre Marreiros Powered BY

Transcript of Get satrted angular js

WorkShopGetting Start With

ANGULAR2015, Alexandre Marreiros

Powered BY

2015AlexandreMarreiros

About YouPresent Yourself

Tell us what brings you here

What you want to take

WorkShopr Getting Start W

ithANGULAR

What’s your Story?Startatsv.com

2015AlexandreMarreiros

AboutCTO @ Innovagency

Technical Trainer, Speaker & Consultant as Self Employee

Lecturer @ EDIT

Software Developer & Architect as Consultant

Tech Writer and Reviewer as Self Employee

Digital Technical UX Consultant

Microsoft DevCamp Trainer

Microsoft Most Valuable Professional for Windows Platform

MCPD

Alexandre Marreiros

Contacts:[email protected] / [email protected]@alexmarreiroshttp://www.linkedin.com/pub/alexandre-marreiros/8/4b8/a21www.digitalmindignition.com

WorkShopr Getting Start W

ithANGULAR

Fundamentals

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Agenda WorkShopr Getting Start W

ithANGULARFundamental Angular Blocks: 

Expressions

Directives

Scopes

Agenda

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Agenda WorkShopr Getting Start W

ithANGULAR

# 1 State of the Web Development

#2 What’s Angular JS

#3 Building Blocks

#4 Controllers and Modules

#5 Directives and Views

2015AlexandreMarreiros

Agenda WorkShopr Getting Start W

ithANGULAR

#6 Services

#7 Routing

#8 Comunication With Events

State Of the Art

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Vca.au.net

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Introduction

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

JavaScript Challenge

Cross Browsing

Help on Responsive BehaviourHelp With Async

Ritch Client InterfaceData Exploring on clientOperating System Native Action

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

JavaScript Story

Not Type SafeBased on a Old StandardFunctional based

Written in 2 WeeksUncopled from modern WebExpensive learning curve

Big Investement

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Angular

Written by Misko Hevery“With the intent to extend HTML Acording to standards

and good pratices. Allow tohave ritch components that help reach data and have data driven event handling”

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Angular atual HeadQuarter

Angularjs.org

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Angular Future

Angular.io

Start Engines

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Start Engines WorkShopr Getting Start W

ithANGULAR

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.js"></script>

<body ng-app> <!-- Other examples in this chapter will be inserted here. --></body>

Include Angular on Project

Define Angular Boundaries* There are no dependicies to other script files all the Angular Core is here

* Ng is the short name for angular, this directive tell that this area is controlled by Angular

First Demos

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Binding Boxes WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Math example WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Helho World WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

ShowCase WorkShopr Getting Start W

ithANGULAR

To Watch a ShowCase

Of APPS Made With Angular

2015AlexandreMarreiros

Plunker is made with AngularJS WorkShopr Getting Start W

ithANGULAR

Our example live editor to build our demos are also build with Angular

Development Enviroment

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Angular Usage Benefits

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Deveopment time reduction WorkShopr Getting Start W

ithANGULAR

Pluralsight.com

2015AlexandreMarreiros

Code Reduction and reusage WorkShopr Getting Start W

ithANGULAR

Pluralsight.com

80% to 90%

2015AlexandreMarreiros

Data Binding WorkShopr Getting Start W

ithANGULAR

Pluralsight.com

Forms (validation and save)One Way BindingTwo Way Binding

Optimized Support out of the box

2015AlexandreMarreiros

Includes all the major features of webapps

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

Support for accebility W

orkShopr Getting Start With

ANGULAR

Using the directive ng-area to develop future on the workshop

2015AlexandreMarreiros

Strong communitie and PopularW

orkShopr Getting Start With

ANGULAR

2015AlexandreMarreiros

Unit Tests ReadyW

orkShopr Getting Start With

ANGULAR

JavaScriptPatterns & Pratices

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

JavaScript Patterns WorkShopr Getting Start W

ithANGULAR

Functions and AbstrationsFunctions to build ModulesFunctions as variablesFunctions as modelation methodsAbstract Functions

Pattern Demos

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

SPA

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULARSingle Page APP“Why do we want to write single page apps? The main reason is that they allow us to offer a more-native-app-like experience to the user.” From SinglePageAppBook

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

SPA

Controllers

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

MVC

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

MVM

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Controllers

Controller directive in HTML (ng-controller)

Controller will be a function that Angular invokes

Controller takes a $scope parameter

Attach model to $scope

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Controllers

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Controllers

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Controllers

$scope:

“Scopes provide a single source of truth within your application. The idea is that no matter in how many places you display some data in your view layer, you should only have to change it in one place (a scope property), and the change should automatically propagate throughout the view.”

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Controllers

Multiple controllers

Complex objects

Nest controllers

Directives

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Directives

“Directives are the heart and soul of Angular.”

https://docs.angularjs.org/guide/directive

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Directives

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Directives

http://www.cheatography.com/proloser/cheat-sheets/angularjs/

Directives

Demo / ExercisesTraining Angular

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Experiment Directives on your ownShowing common bugsShowing api documentation problemsShow the different discussed Javascript patterns aplied in Angular development

WrapUP

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

2015AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Feel free to put your Questions nowOr if you prefer use one off my contacts

@[email protected]@innovagency.com 2015

AlexandreMarreiros

WorkShopr Getting Start W

ithANGULAR

Questions