SlideShare a Scribd company logo
3
Most read
AngularJS
Modules
What is module
An AngularJS module defines an application.
The module is container for different parts of an application.I.e
controllers,services,directives,filters.
Controllers always belong to a module.
Module is used as a main() method.angular is an object and module is a method.
Module is which present in angular object.
Modules in AngularJs
Why module
Module is starting point of angularjs application.
ng-app that have empty module make its controller function global.
Controller function will become global if we don’t register it with the module then
there may be chances of overriding data. To avoid this we have register controller
function with the module.
So that can solve global value problem.
How to create a module
Syntax:
Var app = angular.module(“myModule”, []);
How to add controller to Module:
var myApp=angular.module("myModule",[])
myApp.controller("myController",function($scope){ //Register the controller with the module.
});
Modules in AngularJs
Modules in AngularJs

More Related Content

PPSX
Strings in Java
PDF
Angular - Chapter 1 - Introduction
PPTX
Angular Data Binding
PPTX
Event In JavaScript
PPTX
Angular modules in depth
PDF
introduction to Vue.js 3
PPTX
Angular kickstart slideshare
PPTX
Introduction to Angularjs
Strings in Java
Angular - Chapter 1 - Introduction
Angular Data Binding
Event In JavaScript
Angular modules in depth
introduction to Vue.js 3
Angular kickstart slideshare
Introduction to Angularjs

What's hot (20)

PPTX
Lab #2: Introduction to Javascript
PPTX
Introduction to angular with a simple but complete project
PPTX
Angular Directives
PDF
Angular Dependency Injection
PPTX
Angularjs PPT
ODP
Routing & Navigating Pages in Angular 2
PPTX
Core java complete ppt(note)
PDF
Angular Advanced Routing
PDF
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
PDF
Javascript essentials
PPTX
Javascript
PPSX
Java annotations
PDF
VueJS Introduction
PPT
Angular Introduction By Surekha Gadkari
PDF
Angular 10 course_content
PDF
Basics of JavaScript
PDF
Angular - Chapter 3 - Components
PPTX
PPTX
Angular 9
PPTX
Javascript operators
Lab #2: Introduction to Javascript
Introduction to angular with a simple but complete project
Angular Directives
Angular Dependency Injection
Angularjs PPT
Routing & Navigating Pages in Angular 2
Core java complete ppt(note)
Angular Advanced Routing
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
Javascript essentials
Javascript
Java annotations
VueJS Introduction
Angular Introduction By Surekha Gadkari
Angular 10 course_content
Basics of JavaScript
Angular - Chapter 3 - Components
Angular 9
Javascript operators
Ad

Similar to Modules in AngularJs (20)

PPTX
Controllers in AngularJs
PDF
Angular.js Primer in Aalto University
PPTX
Dive into Angular, part 1: Introduction
PPTX
Angular JS.pptx
PPTX
AngularJS
PPTX
Angularjs
PPTX
AgularJS basics- angular directives and controllers
PPTX
Angular js for beginners
PPTX
Angular js
PPTX
AngularJs Basic Concept
PPTX
Valentine with Angular js - Introduction
PPTX
Angular Js Get Started - Complete Course
PDF
Angular JS tutorial
PPTX
Angular workshop - Full Development Guide
PPTX
ANGULARJS introduction components services and directives
PPSX
PPT
Angular js
PDF
AngularJS in practice
PPTX
Angular js architecture (v1.4.8)
PPT
Coffee@DBG - Exploring Angular JS
Controllers in AngularJs
Angular.js Primer in Aalto University
Dive into Angular, part 1: Introduction
Angular JS.pptx
AngularJS
Angularjs
AgularJS basics- angular directives and controllers
Angular js for beginners
Angular js
AngularJs Basic Concept
Valentine with Angular js - Introduction
Angular Js Get Started - Complete Course
Angular JS tutorial
Angular workshop - Full Development Guide
ANGULARJS introduction components services and directives
Angular js
AngularJS in practice
Angular js architecture (v1.4.8)
Coffee@DBG - Exploring Angular JS
Ad

Recently uploaded (20)

PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Transform Your Business with a Software ERP System
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
AI in Product Development-omnex systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administraation Chapter 3
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PDF
medical staffing services at VALiNTRY
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Nekopoi APK 2025 free lastest update
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Transform Your Business with a Software ERP System
L1 - Introduction to python Backend.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
Upgrade and Innovation Strategies for SAP ERP Customers
AI in Product Development-omnex systems
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administraation Chapter 3
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
medical staffing services at VALiNTRY
ManageIQ - Sprint 268 Review - Slide Deck
Nekopoi APK 2025 free lastest update
ai tools demonstartion for schools and inter college
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Design an Analysis of Algorithms II-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
Odoo Companies in India – Driving Business Transformation.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design

Modules in AngularJs

  • 2. What is module An AngularJS module defines an application. The module is container for different parts of an application.I.e controllers,services,directives,filters. Controllers always belong to a module. Module is used as a main() method.angular is an object and module is a method. Module is which present in angular object.
  • 4. Why module Module is starting point of angularjs application. ng-app that have empty module make its controller function global. Controller function will become global if we don’t register it with the module then there may be chances of overriding data. To avoid this we have register controller function with the module. So that can solve global value problem.
  • 5. How to create a module Syntax: Var app = angular.module(“myModule”, []);
  • 6. How to add controller to Module: var myApp=angular.module("myModule",[]) myApp.controller("myController",function($scope){ //Register the controller with the module. });