O'Reilly logo

AngularJS Directives Cookbook by Fernando Monteiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an Off Canvas menu

Off Canvas menus are very common in web applications. In the age of mobiles, this is a flexible and useful component.

In the following recipe, we will see how to implement an Off Canvas directive.

Note

You can find more information about the Off Canvas menu at https://github.com/dbtek/angular-aside.

Getting ready

Let's create a folder to hold the entire project and name it interface-components. Inside the folder, open your terminal window and type:

yo angm

With the previous command, the application will be generated with all the baseline code that we will need to start.

At the time of writing this chapter, the currently stable AngularJS version was v1.4.2. So, the generator-angm uses this version to create our application. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required