Open In App
Related Articles

How to make buttons using Angular UI Bootstrap ?

Improve Article
Save Article
Like Article

In this article, we will see how to make buttons using Angular UI bootstrap. Angular UI Bootstrap is an Angular JS framework created by Angular UI developers for providing better UI which can be used easily.

Buttons directive is used for making buttons.


<buttonclass='btn btn-primary'>button</button>

Download AngularUI from the link:


  • First, add Angular UI bootstrap scripts needed for your project.

<script src=””></script> <script src=””></script> <script src=””></script> <script src=””></script>

  • Make a button with its UIBootStrap classes which will set the UI look for the buttons.
  • Now make different types of buttons using different classes and run the code.



<!DOCTYPE html>
<html ng-app="gfg">
    <!-- Adding CDN scripts required for our page -->
    <script src=
    <script src=
    <script src=
    <script src=
      // Adding Modules
      angular.module('gfg', ['ngAnimate', 'ngSanitize', 'ui.bootstrap']);
      angular.module('gfg').controller('button', function ($scope) {
    <link href=
    <div ng-controller="button">
      <!-- Making a primary button -->
      <button class="btn btn-primary">Primary Button</button>
      <!-- Making a success button -->
      <button class="btn btn-success">Success Button</button>
      <!-- Making a default button -->
      <button class="btn btn-default">Default Button</button>
      <!-- Making a danger button -->
      <button class="btn btn-danger">Danger Button</button>
      <!-- Making a warning button -->
      <button class="btn btn-warning">Warning Button</button>
      <!-- Making a label primary button -->
      <label class="btn btn-primary">
        Primary Button using label



Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 06 Jan, 2023
Like Article
Save Article
Similar Reads
Complete Tutorials