Skip to content
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

[Question] About aldeed:tabular #126

Open
emehmet opened this issue Mar 23, 2016 · 5 comments
Open

[Question] About aldeed:tabular #126

emehmet opened this issue Mar 23, 2016 · 5 comments
Labels

Comments

@emehmet
Copy link

emehmet commented Mar 23, 2016

Template does'nt work as BlazeComponent class where Template is defined in aldeed:tabular tmpl.

for example like below:

{
    tmpl: Meteor.isClient && Template.SilPersonel
}

We defined Template.SilPersonel as BlazeComponent class but it dosen't work.

@thebarty
Copy link

thebarty commented Apr 6, 2016

Hi @emehmet : After upgrade to meteor 1.3 I just stumbled upon the same problem... it seems like the strict mode (having to remove templating) might be the reason... in meteor 1.2 I still had blaze-html-templates@1.0.1 loaded - now in meteor 1.3 it is removed.

did you find a solution for this?

@mitar
Copy link
Member

mitar commented Apr 6, 2016

Hm, can somebody make a small reproduction here?

@thebarty
Copy link

thebarty commented Apr 6, 2016

just a little update:

I got a 1.3 project with BlazeComponents installed (standard blaze-stuff is removed and replaced by blaze-components)

Case 1 (works)
... when loading eagerly (/client /lib) and doing a console.log(Template.whatever) I am seeing an array with the first element of type Blaze.Template

Case 2 (does NOT work)
... when loading non-eagerly (imports/module/client imports/modele/lib) and doing a console.log(Template.whatever) I am seeing an array with the first element of function (viewName, renderFunction).

So I am getting 2 different return types. In case 2 a Template.whatever returns undefined causing `àldeed:tabular`` to fallback to standard-mode and NOT show the template. Case 1 does work. Case 2 does NOT.

@thebarty
Copy link

thebarty commented Apr 6, 2016

OK, I found the solution. it has NOTHING to do with BlazeComponents, but with getting to know how 1.3 modules work.

in imports/lib/tabular.js add the following to the TOP of the file:

if (Meteor.isClient) {
  require( '../client/template.html' )  // html including the cell-template
}

this will introduce the template to the namespace of the file and lets console.log(Template.whateverTemplateName) return a valid template instance.

@emehmet: does this work for you?

@emehmet
Copy link
Author

emehmet commented Apr 7, 2016

it doesn't work on me. But i so solded so. I use template event just for this part Template.SilPersonel.events({
but this is not a true solution.

@mitar mitar added the question label Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants