Search code examples
angularjspopoverangular-ui-bootstrap

customize the popover in angularJS


In the pop over i want to display some text boxes and buttons into it. http://plnkr.co/edit/2gqXoI7Gc7MtT8Ac264R?p=preview in this link the popover comes with the text "My content" instead of this want to display html elements.


Solution

  • replace your popover attribute with

    popover="{{ content }}" 
    

    and your example.js like so:

    angular.module('plunker', ['ui.bootstrap'])
    .controller('PopoverCtrl', function PopoverCtrl($scope) {
        $scope.content = "test";
      });
    

    This is very basic angularjs stuff though, I think you need to do some docs reading.