JSFiddle - React, Tailwind, and code Playground

by Anthony Price

HTML

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<div ng-app='myApp' ng-controller='myCtrl'> <a data-placement="bottom" href="#" class="btn btn-primary btn-sm ng-scope " id="new-quote-popover" popover>click button
       <div id="popover-head" class="hide">inside info</div>
       <div id="popover-content" class="hide"> 
              <div ng-repeat="se in selectedItems" >
           <input type="text" placeholder="ID" ng-model="selectedItems.myid" />
           <p> <input type="text" placeholder="text" ng-model="selectedItems.mytext" /></p>
           <p> <input type="text" placeholder="text" ng-model="selectedItems.mytexttwo" /></p>
           </div>
       </div>
    </a>
    <div style="padding-top: 200px">
    <div>   id:  {{selectedItems.myid}} </div>
  <div>   text:   {{selectedItems.mytext}}</div>
         <div>   text two:   {{selectedItems.mytexttwo}}</div>
        
        <div>row info here. {{selectedItems}}
    </div>
    
</div>

JavaScript

angular.module('myApp', [])
.controller('myCtrl', function($scope){
    $scope.selectedItems = { sd: '1' };
  
  
})
.directive('popover', function($compile){
    return {
        restrict : 'A',
        link : function(scope, elem){
            
            var content = $("#popover-content").html();
            var compileContent = $compile(content)(scope);
            var title = $("#popover-head").html();
            var options = {
                content: compileContent,
                html: true,
                title: title
            };
            
            $(elem).popover(options);
        }
    }
});