简体   繁体   中英

How to add bower component to gulp app

I am not sure the title is correct but i am new with Bower, Gulp, Strongloop and even AngularJS.

I am updating an existing app, using bower, gulp and Strongloop, and i would like to add a bower componenent to the app (this one : https://github.com/fraywing/textAngular ).

i did bower install textAngular as explained in the readme file, but now i should add those lines to my app :

<link rel='stylesheet' href='/bower_components/textAngular/dist/textAngular.css'>
<script src='/bower_components/textAngular/dist/textAngular-rangy.min.js'></script>
<script src='/bower_components/textAngular/dist/textAngular-sanitize.min.js'></script>
<script src='/bower_components/textAngular/dist/textAngular.min.js'></script>

But my app is using Strongloop, gulp and coffee script, so there is lot of file, not looking like classic html file and i am totally lost.

Can you help me find the next step to make this works ? Thanks alot :)

I finally found my mistake, i need to add --saved at the end of bower command line.

So real line is : bower install textAngular --saved

Plus i should add textAngular in my angular module definition :

angular.module "starter", [
...
"textAngular"
...
]

Note that you should install too font-awesome and rangy to make it works completly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM