0
votes

I just learn ui-grid. I use bower install angular-ui-grid. But, I can't find the files specified in tutorial in https://github.com/angular-ui/ui-grid or http://ui-grid.info/docs/#/tutorial/101_intro.

How is it actually to load the js and css for ui-grid?

1

1 Answers

0
votes

I suspect the confusion is because the tutorial code samples are not done in the wake of a bower-based installation. I used bower and everything you need to include in your HTML (i.e. the Javascript and CSS files) are all dropped in bower_components/angular-ui-grid:

matt@RD0123:~/$ ls -lt bower_components/angular-ui-grid
-rw-rw-r--  1 matt matt     704 Aug 26 10:43 bower.json
drwxrwxr-x 17 matt matt    4096 Aug 26 10:43 less
-rw-rw-r--  1 matt matt     726 Aug 26 10:43 package.json
-rw-rw-r--  1 matt matt    2047 Aug 26 10:43 README.md
-rw-rw-r--  1 matt matt   53493 Aug 26 10:43 ui-grid.css
-rw-rw-r--  1 matt matt    8728 Aug 26 10:43 ui-grid.eot
-rw-rw-r--  1 matt matt 1019595 Aug 26 10:43 ui-grid.js
-rw-rw-r--  1 matt matt   39326 Aug 26 10:43 ui-grid.min.css
-rw-rw-r--  1 matt matt  284080 Aug 26 10:43 ui-grid.min.js
-rw-rw-r--  1 matt matt    9065 Aug 26 10:43 ui-grid.svg
-rw-rw-r--  1 matt matt    8564 Aug 26 10:43 ui-grid.ttf
-rw-rw-r--  1 matt matt    4792 Aug 26 10:43 ui-grid.woff

Then, assuming your HTML file is located in the same place you did the 'bower install' from, you could just relative-reference them thusly:

<link  href="bower_components/angular-ui-grid/ui-grid.css" rel="stylesheet" />
<script src="bower_components/angular-ui-grid/ui-grid.js"></script>