Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Data Oriented Development with Angularjs
  • Table Of Contents Toc
  • Feedback & Rating feedback
Data Oriented Development with Angularjs

Data Oriented Development with Angularjs

By : Manoj Waikar
4.5 (4)
close
close
Data Oriented Development with Angularjs

Data Oriented Development with Angularjs

4.5 (4)
By: Manoj Waikar

Overview of this book

This book helps beginner-level AngularJS developers organize AngularJS applications by discussing important AngularJS concepts and best practices. If you are an experienced AngularJS developer but haven't written directives or haven't created custom HTML controls before, then this book is ideal for you.
Table of Contents (11 chapters)
close
close

Directives

The HTML code (without the directives) is still made up of divs after divs nested inside one another, and those divs make no semantic sense; except for the various class attribute values that you attach to them (or however else you have tried to give them meaning). But wouldn't it be nice if you could instead, structure your HTML like this:

<employee id="1"></employee>

Or maybe like this:

<address type="corporate"></address>

Then, you get a nice little piece of UI which displays the full address or information of the employee.

So what are directives? To repeat an oft-quoted cliché, directives teach old HTML some new tricks, and they are the ones which help us in writing custom controls. So we should write directives when we want to refactor repeated (HTML) code, to create new HTML markup and when we need to manipulate the DOM directly.

As per Angular, it is an anti-pattern to manipulate the DOM in your controllers. You must use...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY