15
Introduction to AngularJS 1day course for the web guys

AngularJS Basics - Knowledge Sharing

Embed Size (px)

Citation preview

Page 1: AngularJS Basics - Knowledge Sharing

Introduction toAngularJS

1day course for the web guys

Page 2: AngularJS Basics - Knowledge Sharing

What is AngularJS

● Structural framework for dynamic web apps● It lets you use HTML as your template

language● Perfect for Single Page Applications (SPAs)● “Superheroic JavaScript MVW Framework”

Page 3: AngularJS Basics - Knowledge Sharing

What you should know

● Basic foreknowledge of HTML● Basic foreknowledge of JavaScript● Software design patterns

Page 4: AngularJS Basics - Knowledge Sharing

MVC and Model View Whatever

● MVC vs MVVM vs MVP● kick-ass apps that are well-designed and

follow separation of concerns - so MV*

Page 5: AngularJS Basics - Knowledge Sharing

Modules and $scope

● Module is a container for the different parts of your app – controllers, services, filters, directives, etc.

● Scope is the glue between application controller and the view.

Page 6: AngularJS Basics - Knowledge Sharing

Working with models

● Basic models● Complex models● JSON objects● View● Bindings.

Page 7: AngularJS Basics - Knowledge Sharing

[Example] Getting your hands dirty

● Create a new project● Install AngularJS● Check if it works and why not :)● Make it work● and display basic model.

Page 8: AngularJS Basics - Knowledge Sharing

Templating the views

● Display the data● Separating the screens/views into the the

partials.● Including the external partials

Page 9: AngularJS Basics - Knowledge Sharing

[Example] Form validation

● Create complete HTML5 form● Implement full validation with custom error

messages● Get the data● and send it to a backend.

Page 10: AngularJS Basics - Knowledge Sharing

Services: $http

● What is a service?● Define a service● Use $http service to read a JSON file

Page 11: AngularJS Basics - Knowledge Sharing

Live binding

● Binding to input fields● Using a filters● Connect filters to binded models

Page 12: AngularJS Basics - Knowledge Sharing

Directives and Filters

● What is a directive?● Filtering content using directives● Writing custom filters

Page 13: AngularJS Basics - Knowledge Sharing

[Example] ng-table

● Pagination● Sorting● Filtering

Page 14: AngularJS Basics - Knowledge Sharing

Deep linking

● What is Deep linking?● Working with the $routeProvider service● Wiring up a second partial● Navigation and $rootScope.

Page 15: AngularJS Basics - Knowledge Sharing

Puzzle SoftwareKnowledge Sharing

Branko Đurković