Book Image

Data Oriented Development with Angularjs

Book Image

Data Oriented Development with Angularjs

Overview of this book

Table of Contents (17 chapters)
Data-oriented Development with AngularJS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Custom Controls

So far, in our study of Angular, we've seen concepts (such as MVC, dependency injection, and so on) which are available in other programming languages or frameworks and you would be right in thinking, how this sets Angular apart from many other frameworks. With our current knowledge and understanding of Angular, we can write perfectly functional and beautiful-looking applications, but it still doesn't make our frontend code more maintainable—for sure, we've structured our JavaScript code into services or filters, which are injected into controllers (which might live in one or more modules), but think hard, there is still a core piece of frontend code which hasn't seen any improvement. That core piece is the HTML part.

In this chapter, we will cover the following topics:

  • What are directives and why do we need them

  • Naming convention of directives

  • How to write directives

  • Different types of directives

  • Isolate scopes

  • Transclusion

  • Directives which communicate