Learning AngularJS Directives

What's Inside

It can be hard to maintain a balance between visual elements of an application associated with HTML and CSS and aspects such as UI Interaction and form validation. Wouldn't it be great if you could use HTML as your own domain specific language (DSL) and have it be a custom thing tuned exactly to the elements and attributes you need for the project you're building?

AngularJS provides this exact solution by separating these two features so that you can make changes in the visual layout without affecting your code. Backed by directives, AngularJS will help you to add functionality to HTML so that you can build interactive, engaging web applications.

Directives help you to extend your HTML and teach it new tricks to visually enhance your websites without compromising your code. This video course covers everything you need to use directives in your own apps, from creating directives to isolating their scope, applying transclusion, and injecting dependencies.

Firstly, we will learn how to include HTML snippets in our code using directives and create a directive to start working with it. We will use isolate scope to configure our directives individually and style them. Next, we will take a look at different operators to bind functions and make our directives interactive. We will explore the concept of transclusion and apply it to make our code more effective. Once we've done this, we will restrict our directives to be used as an element, attribute, class or a comment according to our needs. We will also discover the difference between link and controller functions and inject dependencies to create testable components and co-ordinate our directives to work together. By the end of this course, you'll be proficient with creating and using fully functional directives to your advantage.

This course explains the various concepts of AngularJS directives step-by-step, with a hands-on approach and examples to help you understand and use directives in your code.

About the Author

John Munsch is a professional software developer with over 28 years of experience. For the last 2 years, he has been leading a team that builds modern web app frontends with AngularJS. This was after a couple of years he spent doing the same kind of work with BackboneJS, UnderscoreJS, and HandlebarsJS. He's definitely enjoying a life full of JavaScript, AngularJS, and NodeJS after more than 20 years spent in the Java, C++, and C world.

Get started now!



Certificate Available
4427+ Students
15 Lectures
1+ Hours of Video
Lifetime Access
24/7 Support
Instructor Rating
Packt Publishing

Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and information services to IT professionals. Working towards that vision, it has published over 4,000 books and videos so far, providing IT professionals with the actionable knowledge they need to get the job done–whether that’s specific learning on an emerging technology or optimizing key skills in more established tools.

Popular Bundles