O'Reilly logo

Learning Web Development with Bootstrap and AngularJS by Stephen Radford

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

Using AngularStrap

Now that we've installed AngularStrap, let's take a look at some of the plugins it offers and how we use them.

Before we begin, let's quickly set up a demo environment. Let's duplicate our index.html file and rename it demo.html. We will also change our controller to demoCtrl and add that to our controller.js file. This gives us a nice clean canvas we can play with.

The modal window

A modal window is an extremely common UI paradigm within web apps. It's a great way to display a small amount of information without taking the user out to a new page.

The AngularStrap modal can be called on the click of a button with the bs-modal directive applied to it:

<button class="btn btn-primary" bs-modal="modal">Show Modal</button>

The value passed ...

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