0

I'm trying to implement an example of iconPicker so the files which I should import are:

    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script>
    <script type="text/javascript" src="//rawgithub.com/justin-lau/ui-iconpicker/v0.1.4/dist/scripts/ui-iconpicker.min.js"></script>

I installed the component with bower

<script src="@routes.Assets.versioned("bower_components/angular/angular.min.js")" type="text/javascript"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script>
<script src="@routes.Assets.versioned("bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.min.js")"></script>

the problem is when I try to change the cdn link to local one I can't found this bootstrap-tpls.min.js I found it in angular-bootstrap and it didn't work for me there is any difference? enter image description here

Nhan
  • 3,595
  • 6
  • 30
  • 38
Rajeun
  • 721
  • 2
  • 12
  • 37

1 Answers1

4

Please Install angular bootstrap

bower install angular-bootstrap

Ref: angular ui bootstrap doc

Please see this line.

Note: do not install 'angular-ui-bootstrap'. A separate repository - bootstrap-bower - hosts the compiled javascript file and bower.json In above link.

angular-ui-bootstrap : https://github.com/angular-ui/bootstrap-bower

  • This repository contains required ui-bootstrap.js and ui-boostrap-tpls.js files. basically its bower repository to hold Angular UI Bootstrap.

  • we get this files from this command bower install ui-bootstrap

  • ui-bootstrap-tpls.js file contains ui-bootstrap.min.js + html templates.

angular-bootstrap : https://github.com/angular-ui/bootstrap.

  • This is main repository for the angular bootstrap.
  • Here you see this line in source <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls.js"></script> because this file contains all html + template code which used to show example of bootstrap in angular. So its reuse of ui-bootstrap-tpls.js.

I suggest please install bootstrap using bower install angular-bootstrap and remove angular-ui-bootstrap folder.

Ref: Please see this link. It shows the difference clearly. https://stackoverflow.com/a/19820670/2681997

I hope this will clear your doubt.

Thanks

Bonus: Use this to Tool for installing bower dependencies that won't include entire repos in your project.

bower installer

Community
  • 1
  • 1
Ajay Barot
  • 1,681
  • 1
  • 21
  • 37
  • I've already angular-bootstrap the capture shows this. I asked if there is any difference between all those ui-bootstrap-tpls.min.js files cuz I also found one on this link – Rajeun Sep 27 '16 at 10:25
  • @Rajeun: Means Are you asking the difference between `ui-bootstrap-tpls.min.js` and `ui-bootstrap-tpls-1.1.0.js` ? – Ajay Barot Sep 27 '16 at 10:29
  • exactly why we found the first one in angular-ui-bootstrap and the second in another component – Rajeun Sep 27 '16 at 10:58
  • @Rajeun: Please accept the answer If this clear your confusion. – Ajay Barot Sep 29 '16 at 07:04