0

I've installed AngularJS using the fullstack installer here: https://github.com/DaftMonk/generator-angular-fullstack

I want to now include ng-grid. How do I go about that? I've already ran npm install ng-grid which has copied the files to the node_modules directory. Do I just need to update my index.html file, or do I need to manually update the Grunt file? If so can someone guide me? Can't find anything online that can help me.

I guess the same goes for Compass (I've also already installed Compass using the same method above), as I'd like to initially start using @font-face in my app. I've used Compass several times before but not in this kind of setup...

Thanks :)

UPDATE

I've worked out how I should include ng-grid. Wat I should have done is this in the terminal inside my project's dir:

bower install ng-grid --save

This not only installs the ng-grid files in /bower_components/ but also updates the bower.json in my project's root, so that when I run grunt serve it automatically adds the css & js includes in my index.html page. I'm now successfully displaying a table using ng-grid :)

However I've still not worked out how to install compass successfully. I tried bower install compass-mixins --save-dev but when I save my _fonts.scss file it produces errors. The error being that it can't find the compass files. Maybe the path is wrong, but I read somewhere that that is what I should put at the top (that or just @import "compass";). The paths may also be wrong to my font files, but that's something I'll need to investigate once I can get compass running)

@import "compass/functions";
@include font-face("Roboto-Bold", font-files("../assets/fonts/Roboto-Bold-webfont.woff", "../assets/fonts/Roboto-Bold-webfont.eot?#iefix", "../assets/fonts/Roboto-Bold-webfont.ttf", "../assets/fonts/Roboto-Bold-webfont.svg#LatoBlack"), "../assets/fonts/Roboto-Bold-webfont.eot", "normal", "normal"); 
WastedSpace
  • 1,143
  • 6
  • 22
  • 34

1 Answers1

0

Uhh, I don't think you need any installer for ng-grid. The fullstack installer is for setting up your server sided stack. ng-grid.js should (like any other js library you want to pass to the client-browser) be accessible like you would implement (for example) jQuery.

So, assuming your directory structure has a folder called libs/js, put something like:

<script type="text/javascript" src="libs/js/ui-ng-grid_2.0.11-0/build/ng-grid.js"></script>

in the header of your index.html and put the source code of ng-grid to that folder. Or use a cdn server if you don't want to host the directive on your server.

In no case I would tell anyone from outside where my server sided node modules are stored or would give anyone but me and the server access to them.

mainguy
  • 8,283
  • 2
  • 31
  • 40
  • Thanks for your useful comments! I have however discovered the way I should be doing the ng-grid part. I'll update my question :) – WastedSpace Sep 04 '14 at 14:40