-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'columns' of undefined #1
Comments
What's in templates/grid-template.html? |
Currently:
Essentially what was in the docs. |
Interestingly if I change the template path to some gibberish, e.g. |
I have the docs example working. When I comment out the .css rules |
Interesting. I added that CSS in and I don't get the error anymore. I'm still getting nothing displayed in the template though (it doesn't appear to be reading nor reaching my template, so nothing is displayed at all). Regardless of whether I put gibberish in the |
The browser inspector/console should be displaying a 404 error when the template path is wrong or missing. Took me three tries to find a suitable location for my template file. |
Mine definitely is not (osx chrome). Tried both minified/regular modules,
|
The described error pops up when the CSS is not configured properly. I added a log message in the new v0.1.1 which is available now. Thanks for heads up. Are you sure that your template file is available in a static way? Note that the template has to be placed in a directory where it is available via a simple HTTP GET request (like templates for your AngularJS controllers, AngularJS directives, images, stylesheets, etc.). Do you use "precompiled" AngularJS templates which will be generated by your ExpressJS application? |
I've modified my server so the template is available via a HTTP GET. It renders exactly the same as my main page templates, yet still am getting nothing displayed when I try to load it. I've tried changing the template path to other known-good templates but to no avail. I can see in my server log that it is performing a HTML (here's how it's being rendered too, as you can see it's correctly loading in the amount of cards (there are actually more columns rendered but I edited them out for brevity):
Template:
Tried heaps of things within the templates, tried lots of different templates, nothing is getting rendered inside the cards at all. All are being successfully |
Can you try to include the card template via "ngInclude" in a random place of your app? Something like
|
Using
Putting |
After a bit more troubleshooting, I've configured
If I try to do:
I get no output whatsoever. If I put Interesting that this error only happens when I put the template path in single-quote-within-double-quote. Also happens when I do it like this: Source: http://stackoverflow.com/questions/13943471/angularjs-ng-include |
I'm getting this error when trying to use this grid with ExpressJS/Jade. Occurs at line 182:
var column = (index % self.$$scope.layout.columns) | 0;
HTML setup for Jade:
Gets rendered as:
As you can see there's nothing being output in the columns. I've tried setting the template to a full URL and doesn't work. Perhaps it's an issue with my data structure? Here's one object within the
$scope.posts
arrayThere's about 30 of them in
$scope.posts
and they print just fine when I put them in a{{posts}}
within my template.Any ideas on a remedy?
The text was updated successfully, but these errors were encountered: