Bootstrap 4 Tooltip in Angular

39 views
Skip to first unread message

Reiner Ebel

unread,
Feb 10, 2019, 10:19:29 AM2/10/19
to Angular and AngularJS discussion
Hello,

I'm trying to put the tooltip from Bootstrap into Angular.

<button type="button" class="btn btn-dark rounded-circle"
        data-toggle="tooltip"
data-placement="right"
(mouseenter)="$(this).tooltip('show')"
(mouseleave)="$(this).tooltip('hide')"
title="New Item"
[routerLink]="['/createlist']" >
<i class="fa fa-plus"></i>
</button>

I get this error:
ERROR TypeError: _co.$ is not a function

BR

Reiner

Sander Elias

unread,
Feb 10, 2019, 10:31:22 AM2/10/19
to Angular and AngularJS discussion
Hi Reiner,

Bootstrap is jQuery based and doesn't always work the way you would expect. Checkout ngBootstrap. Its an angular native implementation of Bootstrap 4

Regards
Sander

Scott L

unread,
Feb 11, 2019, 12:15:54 AM2/11/19
to Angular and AngularJS discussion
Agree with Sander's response. I implemented ngBootstrap's tooltip and it worked great - https://ng-bootstrap.github.io/#/components/tooltip/examples

Scott Logsdon

unread,
Feb 11, 2019, 7:53:23 AM2/11/19
to ang...@googlegroups.com
Use ui-bootstrap for AngularJS and ng-bootstrap or ngx-bootstrap for Angular 2+

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages