background preloader

Angular

Facebook Twitter

Building AngularJS Bootstrap Popover Directive Tutorial. 1.Table Of Contents 2.Introduction This is the first of a series of tutorials I am going to write about building AngularJS UI widgets using Twitter’s Bootstrap CSS framework. In this first part we are going to build custom popover(more advanced popup) directive. The aim of these tutorials is to show you how to implement different UI widgets ‘the Angular way’, which means will keep all of our DOM operations in the directive.

These series will require from the reader to have basic AngularJS knowledge. AngularJS comes with pretty big list of built-in directives. So I wont go into much detail about AngularJS directives and move on to building the popover(a little bit more advanced popup). There are a few ways to declare a directive in the html, but using the attribute approach is the one I preffer and also it seems most consistent with HTML5 spec(and works in older IE versions): When this code is parsed angular will search for customPopover directive and apply it to the element. Link 5.Demo. AngularJS — Superheroic JavaScript MVW Framework.