Angular-boostrap popover requires Tooltip Module? - javascript

"Like the Bootstrap jQuery plugin, the popover requires the tooltip module."
Is this why I can't get my popover to work? What is the tooltip module, do I need to import something else? I imported bootstrap, angular-bootstrap, angular, and angular-animate. I still can't get something as simple as this to work:
<button uib-popover="test" popover-placement="top" popover-trigger="mouseenter">test</button>
The plunker example never imports a tooltip module?
https://angular-ui.github.io/bootstrap/#/popover

It's a part of Bootstrap JS framework. You can enable it by in including either tooltip.js or bootstrap.js files on your page.
https://getbootstrap.com/javascript/#tooltips
As for your issue, it's probably caused by some version conflict between the frameworks -- I had similar problem as yours and managed to get it working by updating the frameworks (AngularJS, bootstrap, ui-bootstrap) to their latest versions.
Also, the popovers don't work on disabled elements (using ng-disabled) (see https://github.com/angular-ui/bootstrap/issues/1025 )

Related

''.velocity is not a function - Materialize css

I have a problem with Materialize CSS. With many things that use Javascript I get the error: 'x'.velocity is not a function.
For example: when I click the collapse icon for the sidenav I get e.velocity is not a function. And with the modal I get the error: g.velocity is not found.
I use Materialize CSS in combination with Laravel and installed it this way:
npm install materialize-css
Some things work fine like the wave effect when I click a button. So I know that the javascript is working fine.
I hope somebody can help. Thanks!
To solve this is used the jquery version that is located in the materialize folder
window.$ = window.jQuery = require('materialize-css/node_modules/jquery/dist/jquery.js');
require('materialize-css');

ui-bootstrap-tpls and ui-bootstrap

In my application, I'm using the $modal directive of boostrap.ui. I'm also using the Bootstrap navbar with dropdown functionalities.
I'm having the problem that window.html cannot be found as described in this topic.
The problem in my case is that I have both a ui-boostrap.js file and a ui-bootstrap-tpls file included (v1.3.2)
According to this topic, I should only need the tpls file.
However, when I remove the boostrap.js file, all the other bootstrap functionalities for the dropdowns in my header are not working anymore.
Is it not possible to have both functionalities available?
UI-Bootstrap library is just an Angular wrapper for core Bootstrap library to remove the dependency of jQuery from the application. From the docs:
This repository contains a set of native AngularJS directives based on
Bootstrap's markup and CSS. As a result no dependency on jQuery or
Bootstrap's JavaScript is required.
ui-bootstrap-tpls.min.js or ui-bootstrap-tpls.js contains the default template for all the Javascript module shipped by Bootstrap i.e. why it's named -tpls.
The other file ui-bootstrap.min.js or ui-bootstrap.js does not include any templates for the Javascript modules/features.
So you should only include ui-bootstrap-tpls.min.js or ui-bootstrap-tpls.js if you are not planning to override any template.
The answer about why dropdown stopped working after removing bootstrap.js is that your HTML code is still using the jQuery version of Bootstrap but you should start using the ui-bootstrap version of those modules. Yes, it is possible to include both the Angular version of bootstrap (i.e. ui-bootstrap.min.js) and jQuery version of bootstrap (bootstrap.js) but it will be extra overhead on the app.
There is no need of jQuery in order to use Bootstrap's Javascript features if you have already included the ui-bootstrap library.
As explained by shashank, all bootstrap elements in bootstrap.js in converted to angular directives in ui-bootstrap-tpls.
If you simply replace the file it wont work as you expected.
If you changes to ui-bootstrap-tpls then you need to change the corresponding bootstrap components to angular ui directives.

Jsfiddle with external libs, Font Awesome not rendering, isotope does not toggle layout

Jslint says everything is fine, and I am able to add the external libs. Also code works fine in the IDE/browser, not in Jsfiddle
using Jsfiddle I am trying to debug Isotope toggle size and layout in JS fiddle, but I am unable to get the external libs to render.
Can you help, and correct me?
- if the issue is the order of libs, or what options I selected, is it the semi-colon infront of the JS, I thought this is normally good/safe coding in JS..
Here is the code in JsFiddle, it works in the IDE not JsFiddle
I am using the following font awesome, bootstrap, isotope, ba-bounce, jquery 1.11.2 (JSfiddle only shows 1.11.0)
I'm not sure where you were trying to load your resources from, but you need to provide a URL to the css or js file you want to include. These are usually easy to find hosted on a cdn. I have reconstructed your fiddle using cdn links to the external resources:
jsfiddle: http://jsfiddle.net/voveson/popzfey4/5/

Bootstrap dropdown doesnt work

I'm loading bootstrap into my application via Meteor add xyz (not script tag), and the hidden packages file in my project director reads:
meteor-platform
autopublish
insecure
twbs:bootstrap
iron:router
bootstrap
accounts-ui
accounts-password
jquery
So I definitely have bootstrap working, but when I click on my Bootstrap dropdown menu, or even this 3rd party scrollable dropdown menu:
http://www.bootply.com/86116
The dropdown button gets highlighted around the edges, but nothing drops down.
What's going on here? I've seen similar posts, but they revolved around people loading multiple twbs compilers in the header. Is it possible that my two bootstrap packages are causing a collision?
This could be for a packages conflict.
Try removing meteor remove bootstrap
and just keep with the twbs:bootstrap package.
Something mizzao bootstrap package do the trick
meteor add mizzao:bootstrap-3

Strange JS function issue

I'm developing website. Using 2 libraries at same page: jQuery UI and Twitter Bootstrap.
I single-stepped through combobox code, and when it called .button() it went into bootstrap.min.js, not jqui.js. The question is, how to resolve the conflict between these two libraries?
BTW, Here is jsFiddle where it works well without bootstrap
If button is the only conflict then you may save $.fn.bootstrap_button = $.fn.button after loading bootstrap, and then load jqueryui. Or you may configure and download bootstrap without button widget.

Categories

Resources