angularjs - AngularStrap - Popover in a Popover -


i have angular strap popover contains form elements:

<button type="button" class="btn btn-success" bs-popover title="2nd popover" html="true" data-content="should become form of kind">     <span class='glyphicon glyphicon-plus'></span> </button> 

i load first popover

<button type="button" "class="btn btn-default" bs-popover data-auto-close="1" data-html="true" data-content="{{popovercontent}}" data-animation="am-flip-x" title="1st popover">     button label </button> 

using:

(function() {     "use strict";     angular.module("app").controller("managercontroller", ["$scope", "imagehierarchyrepository", "$templatecache", "$compile", function ($scope, imagehierarchyrepository, $templatecache, $compile) {         imagehierarchyrepository.query(function(data) {             $scope.hierarchies = data;         });         $scope.popovercontent = $templatecache.get("popovertemplate.html");         };     }]); })(); 

however second popover doesn't show up, , i'm guessing has compiling raw html string first popover. how correctly compile contents of popover in angularjs?

i'm not sure if answer question, here's example of how show popover within popover using templates:

<button type="button" class="btn btn-primary" bs-popover data-title="primary popover" html="true" data-template-url="popovertemplate.html">primary popover</button>  <script type="text/ng-template" id="popovertemplate.html">   <div class="popover" tabindex="-1">     <div class="arrow"></div>     <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>     <div class="popover-content">       <button type="button" class="btn btn-default" bs-popover data-title="inner popover" html="true" data-template-url="popover2template.html">         <span class="glyphicon glyphicon-plus"></span>       </button>     </div>   </div> </script>  <script type="text/ng-template" id="popover2template.html">   <div class="popover" tabindex="-1">     <div class="arrow"></div>     <h3 class="popover-title" ng-bind="title" ng-show="title"></h3>     <form class="popover-content">       <div class="form-group">         <label>name:</label>         <input type="text" class="form-control"/>       </div>     </form>   </div> </script> 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -