javascript - Angular ui bootstrap popover with template -


<a data-ng-href="" uib-popover-template="'profile.html'" popover-placement="bottom"></a>  <script type="text/ng-template" id="profile.html">     <div class="media">         <div class="media-left">             <a data-ng-href="">                 <img class="media-object" data-ng-src="" alt="">             </a>         </div>         <div class="media-body">             <h4 class="media-heading" data-ng-bind="mainctrl.authentication.getuser().fullname">unknown user</h4>         </div>     </div> </script> 

error

error: syntax error, unrecognized expression: <div class="media">         <div class="media-left">             <a data-ng-href="">                 <img class="media-object" data-ng-src="" alt="">             </a>         </div>         <div class="media-body">             <h4 class="media-heading" data-ng-bind="mainctrl.authentication.getuser().fullname">unknown user</h4>         </div>     </div>     @ function.sizzle.error (jquery.js:4421)     @ tokenize (jquery.js:5076)     @ select (jquery.js:5460)     @ function.sizzle [as find] (jquery.js:3998)     @ jquery.fn.extend.find (jquery.js:5576)     @ jquery.fn.jquery.init (jquery.js:196)     @ jquery (jquery.js:62)     @ compile (angular.js:7543)     @ ui-bootstrap-tpls.js:4688     @ processqueue (angular.js:14792) 

i created template bootstrap components , using template create bootstrap popover. can correct mistake

i encountered issue today , when post same issue, when entered post title, came across this post.which in turn led me jquery documentation.

essentially did strip spaces in template , worked fine. i.e:

before:

<script type="text/ng-template" id="deletepopover.html">     <div>sample template.</div> </script> 

after:

<script type="text/ng-template" id="deletepopover.html"><div>sample template.</div> </script> 

as angular ui bootstrap doesn't have dependency on jquery, don't know why issue , haven't looked why works, thought i'd post in meantime.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -