-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(popover): support templates #1848
feat(popover): support templates #1848
Conversation
@pkozlowski-opensource , do take a look and let me know what you think. I know you have some other ideas for implementing this, but I was hoping this would be of some inspiration. |
It would be great to get this merged in! |
I agree this would be a fantastic addition. I'm good with just an "allowHtml" attribute as well if that's easier. |
Looking forward to this! |
This is a great feature. |
I think, that popovers should work same as modals. Same parameters, same functions. (templateUrl, template, scope, resolve, controller) Popover may be sometimes used like "small modal" (for example: Facebook and notification popover at the left top of the page). |
I've been thinking along the same lines as @czjvic as well. I would love to have all the same features and behavior in a popover that I get in a modal. I am frequently requiring this in my projects. |
Just plugged this into my project, works great for me. Anyone on the angular-ui team have an opinion on this PR? |
👍 |
I agree with @TimothyKrell: This feature would be really useful for my projects as well. I'm a little surprised it wasn't included in 0.11.0, actually. It works fine if applied in the snapshot, but no longer applies cleanly to the 0.11.0 release. @chrisirhc, any chance, you could create a new PR from the latest stable code? |
@MWallenberg , thanks for pointing out that it no longer applies cleanly. Rebased! |
i want this! |
I want it too |
Man, how hasn't this been added yet? |
Just use the module from angularStrap until this is merged in. That's my solution at least. 😄 |
That's what I ended up doing as well. They use the same names for a few
|
@MWallenberg you can include some modules from angular-strap, some from here. I do it like this: angular.module('app', [
// I use modal and dropdown from
// angular-ui-bootstrap
'ui.bootstrap.tpls',
'ui.bootstrap.modal',
'ui.bootstrap.dropdownToggle',
// but I have a popover from
// angular-strap
'mgcrea.ngStrap.popover',
]); |
please merge this! 👍 |
Would love to hear what reservations there are about this @pkozlowski-opensource. Looks like @chrisirhc worked hard on this. Would at least like some feedback so we can get this in. I'm sure you're as tired of hearing about the need for this feature as we are waiting for it. :-) |
Would be nice to see this reviewed and merged. |
Any update on this? |
This needs documentation in the README |
99fb74f
to
2ba3508
Compare
Added documentation and tests. Also picked tooltip-template and popover-template as the directive names. Should only merge this after #3435 . |
2ba3508
to
a169511
Compare
👏 brilliant! How long I waited this. |
Well.. @just-boris Now you have a good reason to migrate back ;-) |
Woo! |
The time has finally come! Great job guys!!!!! 👍 👍 👏 |
I can't believe it finally happened....... |
Is this already available? |
It is, in the master branch @pankas87. There will be an official 0.13.0 release including this feature soon. |
Oh, I see @rvanbaalen. I'm using Rails Assets (A Bower wrapper for Rails) to install the library, I have to wait for the 0.13.0 release so it updates via bower right? |
(dance) |
Indeed @pankas87. As soon as we publish |
@rvanbaalen @pankas87 You can update through bower now by pointing to the master branch instead of a version. |
That is awesome @stramel I'll do that! Thanks |
o./ |
Not sure if I am doing this wrong or what...
##js
I get the following error message... GET http://localhost:63342/MOCK_UPS__2/MOCK_UPS_2/app/template/popover/popover-template.html 404 (Not Found) It is not even trying to look for my template... and even if I do bring that template in, then it will just make the string 'app/views/android-industries-popover-template.html' the content in the popover. |
Use |
Update: This is ready to merge.
Here's a poll for anybody to get involved in voting to name this directive:Thank you. It'll be calledhttp://goo.gl/forms/oxW1B4L81B
popover-template
andtooltip-template
.Update: I finally got to this. This should be ready for testing.
TODO:
This is a proof of concept to use a tooltipController to transclude a template.
It's based off #1600 and most of the changes are from that. See chrisirhc@0a1510c for actual changes for the popoverWindow.
Tests are missing but I wanted to open this up for discussion or comment.
Fixes #220