3. Why is this project called "AngularJS"?
Because HTML has Angular brackets
Why is the namespace called "ng"?
"ng" sounds like "Angular"
Is AngularJS a library, framework, plugin or a
browser extension?
AngularJS fits the definition of a framework
the best
5. Dev Utils
Getting Started: Comparison of the
options for starting a new project
Debugging: Batarang
Testing: Karma, Protractor
Editor support: Webstorm, Sublime
Text, Visual Studio
Workflow: Yeoman.io and Angular
Yeoman Tutorial
10. Template
Directive
Template structure
We will say: «Hello world!»
At a high level,
Directives are markers
on a DOM element
(such as an attribute,
element name, comment
or CSS class) that tell
AngularJS's HTML
compiler ($compile) to
attach a specified
behavior to that DOM
element (e.g. via event
listeners), or even to
transform the DOM
element and its children
12. «Hello world!!» - ngApp
Use this directive to auto-bootstrap an
AngularJS application.
The ngApp directive designates the root
element of the application and is typically
placed near the root element of the page
- e.g. on the <body> or <html> tags.
13. «Hello world!!» - Template Body
<body>
<!-- menu -->
......
<!-- Dynamic view injection -->
<div ng-view></div>
......
ngView is a directive that complements the $route service by
including the rendered template of the current route into the
main layout (index.html) file.
15. Module
DI – dependecy injection
Routing
Partial Template
Module defined in app.js
We will say: «Hello world!»
Dependency
Injection (DI) is a
software design
pattern that deals
with how
components get
hold of their
dependencies
16. «Hello world!!» - App.js <init>
(function (jQuery) {
'use strict';
var NGBeginner = angular
.module('ngBeginner', [
'ngRoute'
])
})(jQuery);
"use strict"; Defines that JavaScript code
should be executed in "strict mode"
18. Scope
Hierarchy
Scope EcoSystem
We will say: «Hello world!»
Scope is an object that
refers to the application
model. It is an execution
context for expressions.
Scopes are arranged in
hierarchical structure
which mimic the DOM
structure of the
application. Scopes can
watch expressions and
propagate events