0

I've been looking at this example and looking through google to no avail. I don't understand how popover-template works. Is it Angular's templating system? I couldn't find any documentation on this, so I thought I'll turn to the community. How can I similarly create my own template?

<!DOCTYPE html> <html ng-app="myApp"> <head> <script data-require="[email protected]" data-semver="1.1.5" src="http://code.angularjs.org/1.1.5/angular.min.js"></script> <script data-require="[email protected]" data-semver="1.1.5" src="bootstrap-ui.js"></script> <link data-require="[email protected]" data-semver="2.3.2" rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" /> <link rel="stylesheet" href="style.css" /> <script src="script.js"></script> </head> <body ng-controller="Ctrl"> <div style="padding-bottom: 400px"></div> <div class="container-fluid"> <fieldset> <div class="control-group"> <label class="control-label" for="tc">Sample:</label> <div class="controls"> <div class="input-prepend"> <input placeholder="Enter end date.." type="text" class="input-small" ng-model="entity.endDate" name="endDate" /> <button type="button" class="btn" ng-model="$parent.entity.endDate" popover-template="datepicker-test.html"> <i class="icon-calendar"></i> </button> </div> </div> </div> </fieldset> </div> </body> </html> 

1 Answer 1

2

It is a directive from angular-ui's bootstrap sub-project:

<button type="button" class="btn" ng-model="$parent.entity.endDate" popover-template="datepicker-test.html"> 

the corresponding Javascript is inbootstrap-ui.js:

.directive( 'popoverTemplate', [ '$tooltip', function ( $tooltip ) { return $tooltip( 'popoverTemplate', 'popover', 'click' ); }]); 

The project is here: https://github.com/angular-ui/bootstrap

Sign up to request clarification or add additional context in comments.

2 Comments

Maarten, I'm little confused...I can't find popoverTemplate directive in ui-boostrap code...but the weird thing is this link, it seems to use the same version but with that directive!...why?
ok. I think that's the answer: temporary workaround, while the official feature is not available...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.