Тёмный
No video :(

Angular modules and controllers 

kudvenkat
Подписаться 832 тыс.
Просмотров 1 млн
50% 1

creating modules in angularjs
creating controllers in angularjs
In this video we will discuss
1. What is a module in angular
2. How to create a module
3. What is a controller in angular
4. How to create a controller
5. How to register a controller with the module
6. How to use the module that we created to bootstrap the angular application
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our RU-vid channel. Hope you can help.
/ @aarvikitchen5572
What is a module in AngularJS
A module is a container for different parts of your application i.e controllers, services, directives, filters, etc. In this video we will also discuss controllers. We will discuss services, filters and directives in a later video.
Why is a module required
You can think of a module as a Main() method in other types of applications. For example, a Dot Net console application has a Main() method which is the entry point into the application and it wires together the different parts of the application.
Modules are the angular application's equivalent of the Main() method. Modules declaratively specify how the angular application should be bootstrapped.
There are several benefits of the modular approach. It may be difficult to comprehend all those benefits right now, so we will defere the discussion of the benefits to a later video.
How to create a module
Creating a module in angular is staright forward. Use the angular object's module() method to create a module. The angular object is provided by angular script. The following example, creates a module.
var myApp = angular.module("myModule", [])
The first parameter specifies the name of the module.
The second parameter specifies the dependencies for this module
A module can depend on other modules. We will discuss an example of module dependencies in a later video. Right now, the module that we are creating is not dependent on any other external modules, so I am passing an empty array as the value for the second parameter.
What is a controller in angular
In angular a controller is a JavaScript function. The job of the controller is to build a model for the view to display. The model is the data. In a real world application, the controller may call into a service to retrieve data from the database.
How to create a controller in angular
Simple, create a JavaScript constructor function
var myController = function ($scope) {
$scope.message = "AngularJS Tutorial";
}
What is $scope
$scope is an angular object that is passed to the controller function by the angular framework. We attach the model to the $scope object, which will then be available in the view. With in the view, we use the databinding expression to retrieve the data from the scope object and display it.
How to register the controller with the module
Use module object's controller function to register the controller with the module
myApp.controller("myController", myController);
Here is the complete code
//Create the module
var myApp = angular.module("myModule", []);
//Create the controller
var myController = function ($scope) {
$scope.message = "AngularJS Tutorial";
}
// Register the controller with the module
myApp.controller("myController", myController);
The above code can also be written as shown below.
//Create the module
var myApp = angular.module("myModule", []);
// Creating the controller and registering with the module all done in one line.
myApp.controller("myController", function ($scope) {
$scope.message = "AngularJS Tutorial";
});
How to use the module that we created to bootstrap the angular application
Associate the module name with ng-app directive
ng-app="myModule"
Similarly associate the controller using ng-controller directive
ng-controller="myController"
Link for all dot net and sql server video tutorial playlists
www.youtube.co...
Link for slides, code samples and text version of the video
csharp-video-tu...

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 233   
@deremangesh
@deremangesh 7 лет назад
Best online teacher. Videos are very expressive and understood every bit of the topic. Learning various topics with the help of Venkat's video are very easy Thanks Alot.
@Csharp-video-tutorialsBlogspot
Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful. I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you ru-vid.complaylists?view=1&sort=dd If you need DVDs or to download all the videos for offline viewing please visit www.pragimtech.com/kudvenkat_dvd.aspx Slides and Text Version of the videos can be found on my blog csharp-video-tutorials.blogspot.com Tips to effectively use my youtube channel. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-y780MwhY70s.html If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. ru-vid.com If you like these videos, please click on the THUMBS UP button below the video. May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them. Good Luck Venkat
@christiandrotor8301
@christiandrotor8301 6 лет назад
I agree! Thank you for posting. It makes so much sense now.
@amdlina2999
@amdlina2999 Год назад
True!
@TheNanoWeb
@TheNanoWeb 8 лет назад
First time I can hope now I can learn Angular.... Great and to the point video... This what when teacher have full command on what he/she teach... Thank a lot
@barthutto5869
@barthutto5869 8 лет назад
Dear Venkat, Please include in this AngularJS tutorial video series videos that show how to properly consume and interface with a REST API over http, including GET PUT POST and DELETE. I've searched many videos, and they are all confusing and don't detail best practices. I love your teaching style and I think everyone would benefit if you could include this in your AngularJS series. Please kind sir! :)
@basheerahmed3989
@basheerahmed3989 8 лет назад
I've watched almost all of the tuts of SQL series and Angular one is just out of the box... Thanks
@victorkh7
@victorkh7 8 лет назад
The most human friendly intro to Angula up to now for a newbie like myself. Big Thanks!
@eminovperviz
@eminovperviz 7 лет назад
do you know that ? you are amazing , thank for all your tutorials. That`s a great work :)
@kaverit8426
@kaverit8426 5 лет назад
Everyone can easily learn technology with your easiest way of teaching. GREAT..
@ymtan
@ymtan 8 лет назад
A much-looked forward series of AngularJS.
@on-the-slopes
@on-the-slopes 7 лет назад
Very nice videos. Easy to pick up Angular step by step for a beginner. Thanks for sharing.
@pushprajsingh1166
@pushprajsingh1166 7 лет назад
I cannot thank u enough.Im just a beginner but still u made it easy..crisp..and precise.Take a bow!👍
@martin9825
@martin9825 8 лет назад
Best tutorials I've found so far. Only bad thing is that I am too tired to watch them all right now. :)
@priyankvashist4103
@priyankvashist4103 Год назад
ive learned so much from your videos sir...Best onlime tutor ever
@poonam-kamboj
@poonam-kamboj 8 лет назад
first time I understood controller and module clearly after a long search :) , thanks for the tutorial
@adrianohernandez2650
@adrianohernandez2650 8 лет назад
Venkat, thank you for you tutorials. I hope I could be able to donate for you someday.
@Smily-yash
@Smily-yash 4 года назад
Superb explanation!!! Thank you somuch for your explanation.
@bajoko99
@bajoko99 3 года назад
Best angularjs tutorial !!
@kumarnavaneet340
@kumarnavaneet340 4 года назад
Ur explanation of stuffs are awesome... I have checked out almost all of ur videos
@pentagopal3866
@pentagopal3866 2 года назад
Your tutorial excellent helpfull to the beginning .. thanks a lot
@mashudumafuna2607
@mashudumafuna2607 7 лет назад
you make complicated topic very simple
@NourLababidi
@NourLababidi 6 лет назад
I think you are the best teacher ever! Thank you
@Hferko67
@Hferko67 2 года назад
Sir, this course is GREAT !
@kulkarnibaswaraj1376
@kulkarnibaswaraj1376 8 лет назад
now i m feeling to learn Angular JS .. great tutorial .. thanks venkat..!
@japhethnyakundi1986
@japhethnyakundi1986 8 лет назад
nice videos,practical and easy to understand
@ultimatefun1097
@ultimatefun1097 8 лет назад
nice tutorial for beginners.
@mathavang953
@mathavang953 4 года назад
Explanation is very easy to understand like a direct class . Thanks a lot 🤗
@sijuv2385
@sijuv2385 6 лет назад
Excellent video . You are a good online teacher. Thank you so much.
@amudhanpalanivel5157
@amudhanpalanivel5157 Месяц назад
Nice and very informative, the way you taught was so impressive.
@yusufmohamedsalh8321
@yusufmohamedsalh8321 7 лет назад
thank you very much for the videos ,your voice is quite instructive and calm ,till the limit i fall asleep while watching , really the best videos ever .Thank You Venkat.
@chanchalagrawal06
@chanchalagrawal06 3 года назад
Hello Venkat sir. I find all your videos to be super amazing. you are the best online teacher. Thanks for providing a clear concept on all topics
@darkthrongrising5470
@darkthrongrising5470 7 лет назад
I just finished your Bootstrap series, it was very easy to follow and I learned a great deal. I need to go back and hit all the like buttons. I expect this Angular series will be just as good, thank you for your hard work.
@anumathsacademy4958
@anumathsacademy4958 3 года назад
Understandable Introduction.
@Jacker1z
@Jacker1z 8 лет назад
Well, so far your explanations are really good; it seems this is a very structured tutorial and i enjoyed it a lot, Thank you.
@dotnetprakash2301
@dotnetprakash2301 8 лет назад
you're a great teacher. thanks for making this video and sharing it to the world.
@manaswinim7775
@manaswinim7775 8 лет назад
There might be hundreds of tutorials available over internet . But YOURS ALWAYS BEST ..hence waiting for them ! :-)
@ebrahim143
@ebrahim143 7 лет назад
very thankful venkat sir, for sharing the knowledge of AngularJs
@sundarkartick
@sundarkartick 8 лет назад
Dear Venkat, thanks a lot for your tutorials
@e.ch.vidyasagarkorada8937
@e.ch.vidyasagarkorada8937 4 года назад
Thank you in detail explanation very useful New to angular
@shanpalaniram
@shanpalaniram 8 лет назад
Wonderful explanation. Thank you!
@manaswinim7775
@manaswinim7775 8 лет назад
Hi Venkat Sir, asusual your videos are aways awesome .. Even complex topic becomes sooo simple and easy when YOU explain it . We follow all your videos .. In our office we call you "King of .Net Gurus" Your voice is also soo sweet :D
@godzalli44
@godzalli44 8 лет назад
wow... very easy to learn... thanks...
@renbotha
@renbotha 7 лет назад
Thanks! Helped me understand the concepts of controllers and modules while doing the Angular.JS tutorials. Must see if you are a beginner in Angular.JS
@thuglifecreator7979
@thuglifecreator7979 2 года назад
very very good teacher you are
@persistencej3116
@persistencej3116 8 лет назад
Your Tutorials are so helpful to the beginners ... Thanks a lot
@ishaqsulthan6047
@ishaqsulthan6047 4 года назад
Nice tutorial I learn more...
@indugunturu
@indugunturu 7 лет назад
Videos are very helpful.Thanks so much
@sanjayvishwakarma2299
@sanjayvishwakarma2299 8 лет назад
Nice explanation, specially liked the explanation for Script.js .Thank you so much. Looking forward for more angular tutorial from end Sir.
@bjornsegrell6324
@bjornsegrell6324 8 лет назад
Jolly Good - Kudos 2 Kudvenkat Very well explained for newbies with add short attention span
@bradleyr4451
@bradleyr4451 8 лет назад
Thanks Sir Venkat, this is the best I've seen on teaching Angular, your style is so helpful
@lavleshgarg
@lavleshgarg 6 лет назад
Thanks for the tutorial. It's very well explained. It couldn't be better.
@Kaiyoga2
@Kaiyoga2 7 лет назад
Thank you so much for all your excellent tutorials. And your voice is so nice too so it s a pleasure to lesson
@asimrahim1243
@asimrahim1243 5 лет назад
well explained... I learned many things and basic concepts of every topic from your lectures...you are following a good and easy teaching method ... I really appreciate your hard work.
@scruffythebug
@scruffythebug 6 лет назад
Great info. Thanks, kudvenkat! FYI, depending on the AngularJS version you're using, you may get "uncaught error injector modulerr" since, as of 1.1.6, the ngRoute module is separate. To resolve, add angular-route.js (in addition to angular.js).
@irannakalyani2190
@irannakalyani2190 8 лет назад
thanks Venkat for starting series AngularJs. i was waiting for it from a long time.
@discodj7479
@discodj7479 5 лет назад
Amazing .👍
@MrPsingh007
@MrPsingh007 7 лет назад
nice stuff...
@ravichandra4022
@ravichandra4022 2 года назад
super explaination
@rawatgovind2011
@rawatgovind2011 8 лет назад
Great Tutorial. Thanks.
@kamrul8616
@kamrul8616 7 лет назад
That's very good tutorial for angularJS
@irfandahir9163
@irfandahir9163 8 лет назад
Great tutorial. You've explained the concepts very well.
@plamivanov9120
@plamivanov9120 8 лет назад
well explained
@ajpieri
@ajpieri 6 лет назад
Superb! You are a very good teacher. I am glad I found you. Can't wait to watch the rest of your videos.
@varshareddybairi6189
@varshareddybairi6189 7 лет назад
Good explanation
@laxregula9007
@laxregula9007 7 лет назад
crispy and clear
@NaveenKumar-dg4ct
@NaveenKumar-dg4ct 5 лет назад
Awesome videos venkat thanks allot
@xiaomengzhang6467
@xiaomengzhang6467 6 лет назад
Thank you sir. You are the best teacher!
@shorifulislam923
@shorifulislam923 8 лет назад
Thank you sir i want to more video tutorial
@rotrose7531
@rotrose7531 5 лет назад
Thank you very much. precise and concise explanation! Hope more advanced angularJS tutorials will be published
@Csharp-video-tutorialsBlogspot
Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful. Here is the link to our complete AngularJS playlist where you will find all the videos in logical sequence. Hope this helps. ru-vid.com/group/PL6n9fhu94yhWKHkcL7RJmmXyxkuFB3KSl
@jayantiroy1476
@jayantiroy1476 3 года назад
The last mapping image was very clear
@kieronsportive96
@kieronsportive96 8 лет назад
good job...this will help lots of people for their carrier...:)))
@achalmahto2146
@achalmahto2146 8 лет назад
Thanks venkat sir, nice explanation.
@syedfarhanali6398
@syedfarhanali6398 8 лет назад
Dear Venkat, thanks a lot for your tutorials waiting for more
@JitendraVishwakarmablush
@JitendraVishwakarmablush 7 лет назад
really, Your explanation is awesome. grate job.
@iliyasmohammed6192
@iliyasmohammed6192 6 лет назад
Thankyou so much for creating videos and making a very easy explanation. Keep it up
@peterl1699
@peterl1699 8 лет назад
Thank you so much for starting this tutorial. Most regards
@Dhavalshah9131
@Dhavalshah9131 8 лет назад
Thank You So much Sir. Much Awaited Tutorial !!!
@jeewanmaharjan2712
@jeewanmaharjan2712 8 лет назад
Web API + Angular rocks. Thank you sir
@ramachandranm4210
@ramachandranm4210 8 лет назад
very nice Mr venkat. day by day you are improving your slide show which is very useful us to understand the points clearly. Sir I asked on question on SQL video series at PART 112 RUNNING TOTAL. when you ve time please answer it sir.
@seanpereira5824
@seanpereira5824 Год назад
brilliant...
@Massquare
@Massquare 7 лет назад
Good explanation good teaching...
@someshnukala804
@someshnukala804 8 лет назад
Kudvenkat sir is most famous and great. Very Good explanation sir.
@deshraj2459
@deshraj2459 2 года назад
nice tutorial man thank you so much 👌👌👌👌👌👌👌👌👌👌👌👌😘😘😘😘
@MrRalebgd
@MrRalebgd 6 лет назад
Excellent Tutorials
@kieronsportive96
@kieronsportive96 8 лет назад
just wana appreciate again man ..great job
@sr.nitish2268
@sr.nitish2268 7 лет назад
Hello Sir, Thanks a lot for such a nice tutorial.
@mohamedfanane8271
@mohamedfanane8271 8 лет назад
thanks my friend
@life_with_yolanda
@life_with_yolanda 7 лет назад
very clear sir.
@zhabinsky
@zhabinsky 5 лет назад
awesome, thanks
@BrainBUG1231
@BrainBUG1231 8 лет назад
Very well explained, Venkat. Cheers to you.
@rsblackbuddy11
@rsblackbuddy11 6 лет назад
sir, you are a god! thank you so much for the tutorial!!
@faizalkhan7368
@faizalkhan7368 6 лет назад
Veri nice explanation sir... thank-you so much sir😍😍
@arpitadas9542
@arpitadas9542 7 лет назад
very nice
@qwertyhgfdsa0
@qwertyhgfdsa0 6 лет назад
Thanks a lot. Awesome work!
@kanishkadas5907
@kanishkadas5907 7 лет назад
Best tutorial. I appreciate
@shrkhan2695
@shrkhan2695 7 лет назад
Great Demo Sir! really appreciate the voice the demo all superb.
@caseyvandyke7051
@caseyvandyke7051 8 лет назад
Very good tutorial thanks and keep it up!
@mohammadhoseinifar3995
@mohammadhoseinifar3995 7 лет назад
you are amazing thank you
@soultouchingsongs
@soultouchingsongs 7 лет назад
Very informative. Thanks a lot.
@LolRandomAcc
@LolRandomAcc 8 лет назад
This is such a great turtorial... Thank you! Really well done! Keep up the good work mate!
@bhoopendrasharma9474
@bhoopendrasharma9474 8 лет назад
Thank you.. Venkat sir...!!!!
@lakshmidevi4835
@lakshmidevi4835 7 лет назад
Thank you very much venkat, Its realy Helpful.
Далее
Controllers in AngularJS
10:56
Просмотров 673 тыс.
AngularJS tutorial -  What is AngularJS
10:28
Просмотров 2,2 млн
СЕРЕГА ПИРАТ - TEAM SPIRIT
02:37
Просмотров 292 тыс.
What’s new in Angular v18
20:08
Просмотров 118 тыс.
Routing and Navigation in Angular | Mosh
24:32
Просмотров 284 тыс.
Liskov: The Liskov Substitution Principle
4:23
Просмотров 21 тыс.
AngularJS controller as syntax
12:29
Просмотров 101 тыс.
Angular 18 is EXACTLY what we needed
9:15
Просмотров 74 тыс.
AngularJS Tutorial
40:13
Просмотров 384 тыс.
AngularJS routeparams example
14:12
Просмотров 133 тыс.