23. Creating Module
var sampleApp = angular.module('sampleApp', []);
What it is for?
This is where dependency
injection comes in
var sampleApp = angular.module('sampleApp', [‘helperApp’]);
sampleApp depends on helperApp
module
AngularJs is structural framework for dynamic web app.
Client side javascript framework for adding interactivity to HTML
DRY – don’t repeat yourself
Template – Html with additional markup
Model – Data shown to user and with which user interact
Directive – extends html with custom element and attributes
Scope – context where the model is stored so that controllers, directives, and expressions can access it.
Expressions – access variables and functions from the scope.
Compiler – parses the template and instantiate directives and expressions
Filter – Format the value of and expressions for display to user.
View – What user sees (DOM)
Data Binding – Sync data between the model and the view.
Controller – the business logic behind views
Module – Container for different part of and app, including controllers, service, filter, directive, which configures the injector.
Service – reusable business logic independent of views.