AngularJS Directives Cookbook

Extend the capabilities of AngularJS and build dynamic web applications by creating customized directives with this selection of more than 30 recipes
Preview in Mapt

AngularJS Directives Cookbook

Fernando Monteiro

1 customer reviews
Extend the capabilities of AngularJS and build dynamic web applications by creating customized directives with this selection of more than 30 recipes
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $31.99
Save 68%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


AngularJS Directives Cookbook Book Cover
AngularJS Directives Cookbook
$ 31.99
$ 10.00
Robot Operating System Cookbook Book Cover
Robot Operating System Cookbook
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $51.98
Add to Cart

Book Details

ISBN 139781784395896
Paperback206 pages

Book Description

AngularJS directives are at the center of what makes it such an exciting – and important - web development framework. With directives, you can take greater control over HTML elements on your web pages – they ‘direct’ Angular’s HTML compiler to behave in the way you want it to. It makes building modern web applications a much more expressive experience, and allows you to focus more closely on improving the way that user interaction impacts the DOM and the way your app manages data. If you’re already using Angular, you probably recognize the power of directives to transform the way you understand and build your projects – but customizing and creating your own directives to harness AngularJS to its full potential can be more challenging. This cookbook shows you how to do just that – it’s a valuable resource that demonstrates how to use directives at every stage in the workflow.

Packed with an extensive range of solutions and tips that AngularJS developers shouldn’t do without, you’ll find out how to make the most of directives. You’ll find recipes demonstrating how to build a number of different user interface components with directives, so you can take complete control over how users interact with your application. You’ll also learn how directives can simplify the way you work by creating reusable directives – by customizing them with Yeoman you can be confident that you’re application has the robust architecture that forms the bedrock of the best user experiences. You’ll also find recipes that will help you learn how to unit test directives, so you can be confident in the reliability and performance of your application.

Whether you’re looking for guidance to dive deeper into AngularJS directives, or you want a reliable resource, relevant to today’s web development challenges, AngularJS Directives Cookbook delivers everything you need in an easily accessible way.

Table of Contents

Chapter 1: Dealing with Modal and Tabs Directives
Introduction
Using inline HTML templates
Creating a simple modal directive
Loading external templates for best practices
Using the link function
Dealing with tabs without Bootstrap UI directives
Chapter 2: Building a Navbar Custom Directive
Introduction
Building a navbar directive
Directory structure for common components
Directive's controller function
Using the data attribute to HTML5 compile
Chapter 3: Customizing and Using Bootstrap UI Directives
Introduction
Dealing with modal directives
Creating tab directives
The isolate $scope
Building accordion tab directives
Loading dynamic content
Chapter 4: Creating Interactive jQuery UI Directives
Introduction
A simple directive example
Manipulating the DOM with jQuery
The compile and link functions
Creating the jQuery UI draggable directive
Creating the jQuery UI droppable directive
Chapter 5: Implementing Custom Directives with Yeoman Generators
Introduction
Creating the baseline app with generator-angm
Generator best practices
How to implement the ngMap directive
Using the Angular-Loading-Bar directive
Implementing the ng-grid directive
Chapter 6: Using Directives to Develop Interface Components
Introduction
Creating an Off Canvas menu
Applying custom CSS
Building a shopping cart
Chapter 7: Building Directives with Dynamic Templates
Introduction
Using dynamic templates on directives
The compile function
Organizing dynamic directives on shared folders
Mixing different content on templates
Chapter 8: Creating Reusable Directives
Introduction
How to scale an AngularJS project to use reusable directives
Building a directive as an interface component
Creating a form directive with custom validation
Chapter 9: Directive Unit Testing with Karma and Jasmine
Introduction
How to test AngularJS apps using Karma and Karma Runner
Writing tests for directives with Jasmine
Testing elements when the scope changes

What You Will Learn

  • Build and customize external HTML templates, and create simple, effective directives for common interface components
  • Learn how to use Controller function and any Bootstrap UI directives to manipulate the DOM and how to transform any UI library into AngularJS directives
  • Construct an AngularJS application to use shared components and validate your HTML5
  • Discover how to use jQuery events and manipulate the DOM using jQuery UI inside AngularJS applications
  • Create custom directives for ongoing projects using Yeoman generators, and find out how to implement standalone directives
  • Build reusable directives for Large AngularJS applications and extend directives to use dynamic templates
  • Write unit test for directives using the Karma runner and Jasmine’s behavior-driven development framework

Authors

Table of Contents

Chapter 1: Dealing with Modal and Tabs Directives
Introduction
Using inline HTML templates
Creating a simple modal directive
Loading external templates for best practices
Using the link function
Dealing with tabs without Bootstrap UI directives
Chapter 2: Building a Navbar Custom Directive
Introduction
Building a navbar directive
Directory structure for common components
Directive's controller function
Using the data attribute to HTML5 compile
Chapter 3: Customizing and Using Bootstrap UI Directives
Introduction
Dealing with modal directives
Creating tab directives
The isolate $scope
Building accordion tab directives
Loading dynamic content
Chapter 4: Creating Interactive jQuery UI Directives
Introduction
A simple directive example
Manipulating the DOM with jQuery
The compile and link functions
Creating the jQuery UI draggable directive
Creating the jQuery UI droppable directive
Chapter 5: Implementing Custom Directives with Yeoman Generators
Introduction
Creating the baseline app with generator-angm
Generator best practices
How to implement the ngMap directive
Using the Angular-Loading-Bar directive
Implementing the ng-grid directive
Chapter 6: Using Directives to Develop Interface Components
Introduction
Creating an Off Canvas menu
Applying custom CSS
Building a shopping cart
Chapter 7: Building Directives with Dynamic Templates
Introduction
Using dynamic templates on directives
The compile function
Organizing dynamic directives on shared folders
Mixing different content on templates
Chapter 8: Creating Reusable Directives
Introduction
How to scale an AngularJS project to use reusable directives
Building a directive as an interface component
Creating a form directive with custom validation
Chapter 9: Directive Unit Testing with Karma and Jasmine
Introduction
How to test AngularJS apps using Karma and Karma Runner
Writing tests for directives with Jasmine
Testing elements when the scope changes

Book Details

ISBN 139781784395896
Paperback206 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Responsive Web Design with HTML5 and CSS3 - Second Edition Book Cover
Responsive Web Design with HTML5 and CSS3 - Second Edition
$ 31.99
$ 10.00
Learning Angular 2 Book Cover
Learning Angular 2
$ 31.99
$ 10.00
Mastering Angular 2 Components Book Cover
Mastering Angular 2 Components
$ 35.99
$ 10.00
AngularJS: Maintaining Web Applications Book Cover
AngularJS: Maintaining Web Applications
$ 59.99
$ 10.00
Angular 2 By Example Book Cover
Angular 2 By Example
$ 35.99
$ 10.00
Web Development with Bootstrap 4 and Angular 2 - Second Edition Book Cover
Web Development with Bootstrap 4 and Angular 2 - Second Edition
$ 39.99
$ 10.00