ng2-handsontable icon indicating copy to clipboard operation
ng2-handsontable copied to clipboard

No styles after following Quick start

Open daleclements opened this issue 8 years ago • 4 comments

Following the Quick start instructions:

I installed with "npm i ng2-handsontable --save" and didn't do step 2, because I'm using the CLI. Updated the module file per step 3, then added:

To the .html: <hot-table [data]="data" [options]="options">

and to the component.ts: data: Array = [ [1,2,3], [4,5,6] ] options ={ colHeaders: true, rowHeaders: true }

From the result it seems clear that no styles are being applied: image

I've tried copying handsontable.css from the original non-angular handsontable project and including it in the component's styleUrls but that didn't work.

In the process of writing this I tried including it in a tag in my index.html and that seems to have worked, but I'm still submitting to say that some mention of the required .css should be in the Quick Start section.

daleclements avatar May 08 '17 19:05 daleclements

were you able to solve this issue? I am having the same problem now.

ShaofeiZi avatar May 18 '17 15:05 ShaofeiZi

Yes but only in the way that I described above. I had to go to the original non-angular handsontable github page, copy out the handsontable.css file (https://github.com/handsontable/handsontable/blob/master/src/css/handsontable.css), and include it in a

daleclements avatar May 18 '17 18:05 daleclements

Thank you, but I still can not......

ShaofeiZi avatar May 19 '17 06:05 ShaofeiZi

@ShaofeiZi I took that css file, made a local copy, and referenced it directly within my master css file like this:

@import url('css/handsontable.css');

I imagine you could add it to the .angular-cli.json file's scripts property if you are using the CLI, although I didn't test that.

It is working for me. Certainly this step shouldn't be required, or should at least be documented.

jasonburrows avatar May 26 '17 16:05 jasonburrows