javascript - How to include jQuery to my app? -


i'm developing app based on angular gulp generator. want use angular-ui , bootstrap components. able build application, generated index.html file contains script tags boostrap, angular ui jquery missing here.

i have jquery in bower.js file , ran bower install command. it's installed in bower_components directory.

browser console contains error

error: bootstrap's javascript requires jquery throw new error('bootstrap\'s javascript requires jquery') 

is neccessary inject query angular app, or why error occur?

the problem dear using bootstrap js require jquery.

on angular-ui website said required bootstrap css , anugular js.

the required dependencies are:

angularjs (requires angularjs 1.3.x, tested 1.3.13). 0.12.0 last version of library supports angularjs 1.2.x.

bootstrap css (tested version 3.1.1). version of library (0.13.0) works bootstrap css in version 3.x. 0.8.0 last version of library supports bootstrap css in version 2.3.x.

so according question.

is neccessary inject query angular app, or why error occur?

it not necessary @ in context of angular js.

it showing error because using boostrap js have add jquery before loading it. according bootstrap. link

plugin dependencies plugins , css components depend on other plugins. if include plugins individually, make sure check these dependencies in docs. note plugins depend on jquery (this means jquery must included before plugin files). consult our bower.json see versions of jquery supported.

by default angular used jqulite if add jquery before loading angular js use jquery.

hope helps :).


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -