Questions tagged [angular-ui-bootstrap]

A set of AngularJS directives based on Twitter Bootstrap's markup and CSS

Angular UI bootstrap is a set of AngularJS directives based on Twitter Bootstrap's markup and CSS.

The goal is to provide native AngularJS directives without any dependency on jQuery or Bootstrap's JavaScript. It is often better to rewrite an existing JavaScript code and create a new, pure AngularJS directive. Most of the time the resulting directive is smaller as compared to the original JavaScript code size and better integrated into the AngularJS ecosystem.

Directives

Stack Snippet Starter Pack

HTML:

<link href="//unpkg.com/bootstrap@3/dist/css/bootstrap.css" rel="stylesheet">
<script src="//unpkg.com/angular/angular.js"></script>
<script src="//unpkg.com/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>

<div ng-app="ui.bootstrap.module" >
  <div ng-controller="ui.bootstrap.ctrl">

    <span uib-tooltip="{{ToolTipText}}" tooltip-placement="bottom" >
      Hover for Tooltip
    </span>

  </div>
</div>

JavaScript:

angular.module('ui.bootstrap.module', ['ui.bootstrap'])
.controller('ui.bootstrap.ctrl', function ($scope) {
  $scope.ToolTipText = "Hello, World!";
})

Related Tags

  • AngularStrap is light and fast. It has been built from the ground up to leverage ngAnimate!

Related Libraries

  • UI-Bootstrap 4 Bootstrap components written in pure AngularJS by the AngularUI Team. Ported to Bootstrap 4 by Morgul
4643 questions
50
votes
8 answers

How to create an angularJs wrapper directive for a ui-bootstrap datepicker?

I am using the ui.bootstrap.datepicker directive to display some date field. However most of the time I need the same setup: I want it to come along with a popup and a popup button and also I want German names for the texts. That does create the…
yankee
  • 38,872
  • 15
  • 103
  • 162
49
votes
6 answers

Unable to call Object.keys in angularjs

I'm using a UI.Bootstrap accordion and I've defined my heading like so: {{ cname }} {{ Object.keys(stations).length }}…
Gargoyle
  • 9,590
  • 16
  • 80
  • 145
48
votes
12 answers

Hide Angular UI Bootstrap popover when clicking outside of it

I am trying to manually close a bootstrap popover to get it to close when I click anywhere on the document or body that isn't the popover. The closest thing I have found to accomplishing this is to create a directive (found this answer) but this is…
bryan
  • 8,879
  • 18
  • 83
  • 166
47
votes
3 answers

AngularJS/Angular-ui-bootstrap Changing language used by the datePicker

I use the datePicker documented here. However, no direct option allows to change the language, English by default. I find a the documentation of the widget provided without angular directive, and it provides a nice way to achieve…
Mik378
  • 21,881
  • 15
  • 82
  • 180
45
votes
4 answers

How to use angular component with ui.bootstrap.modal in angular 1.5?

I'd like to use angular component with ui.bootstrap.modal. angular version is 1.5. I tried to use like below. component function MyComponentController($uibModalInstance){ var ctrl = this; ctrl.doSomething = function() { //doSomething …
wtadahiro
  • 685
  • 1
  • 8
  • 13
45
votes
8 answers

How do I create an AngularJS UI bootstrap popover with HTML content?

I want to create a bootstrap popover with a pre tag containing a prettified JSON object. The naive implementation, escapes the content before inserting it…
43
votes
7 answers

How to have at least two datepickers of ui-bootstrap on a single page?

I want to have several datepickers on a page. But with the default solution from UI-Bootstrap it is not possible, no one of datepickers may be opened. The conflict with each other. Here is my code:
Green
  • 28,742
  • 61
  • 158
  • 247
41
votes
7 answers

ui-bootstrap pagination resetting current page on initialization

I am using the pagination directive from the ui-bootstrap (angular-bootstrap) library. I am having an issue when it initializes. My issue occurs when I navigate to a specific page via url. What is happening is that my controller initializes with…
pcgilday
  • 1,032
  • 2
  • 10
  • 15
41
votes
3 answers

How to close Angular UI Modal from anywhere

I am using the Angular UI bootstrap modal dialog and create it within a service: myApp.factory('ModalService', ['$modal', function($modal) { return { trigger: function(template) { $modal.open({ templateUrl:…
DonJuwe
  • 4,477
  • 3
  • 34
  • 59
40
votes
9 answers

How to prevent an angular-bootstrap dropdown from closing (Unbind Event which was bound by a directive)

I am using the Angular-Bootstrap Dropdown. I want to prevent it from closing on click until the user closes it intentionally. Default state is: The Dropdown closes when clicking somewhere in the Document. I identified the relevant lines of code:…
ulilicht
  • 737
  • 1
  • 7
  • 18
39
votes
11 answers

Datepicker not opening twice in angular-ui version 0.11.0

I am trying to have 2 datepickers and I am using Angular UI version 0.11.0. My HTML code
39
votes
1 answer

In the AngularJS BootstrapUI Typeahead, what's $viewValue?

I'm trying to implement a typeahead in Angular using http://angular-ui.github.io/bootstrap/ Seems like it should be easy, but I'm getting the following error: Global symbol $viewValue requires explicit package name. What is $viewValue? It doesn't…
stampeder
  • 713
  • 2
  • 7
  • 6
39
votes
10 answers

AngularJS UI Bootstrap Tabs that support routing

I would like to use AngularJS UI Bootstrap Tabs in my project, but I need it to support routing. For example: Tab URL -------------------- Jobs /jobs Invoices /invoices Payments /payments As far as I can tell from the source code,…
36
votes
4 answers

How to add bootstrap in angular 6 project?

I have tried to add styles dependency in angular.json package but showing that the module not found. adding two of the bootstrap files. here is the screenshot of both the files the angular.json file is like this angular.json file
Nikhil S
  • 3,786
  • 4
  • 18
  • 32
36
votes
2 answers

Should I use Angular UI Bootstrap or plain Bootstrap 3?

At time of writing Angular UI Bootstrap is based on Twitter Bootstrap 2 while the latest version is Bootstrap 3. If I were to write an application in Angular.js TODAY, what UI framework should I use? Angular UI or just plain Bootstrap? What pros and…