mquandalle / meteor-jade

The Jade template engine for Meteor/Blaze
http://atmospherejs.com/mquandalle/jade
MIT License
307 stars 39 forks source link

using jade with angular-meteor causes flex attribute to become flex="flex" #177

Closed mattiLeBlanc closed 9 years ago

mattiLeBlanc commented 9 years ago

Hi,

I am working on an angular+meteor project using the package civilframe:angular-jade to enable ng.jade templates. This package is using this Jade package for compiling. Anyway, I noticed that when ng.jade is converted it tends to change the single attributes without value.

div(flex) Foo

becomes

<div flex="flex">Foo</div>

It should just stay

<div flex>Foo</div>

because Angular Materials is tripping over this. It doesn't know flex="flex" and turns into class="flex-flex" :)

Is there an easy fix to not convert attributes that are without value?

mquandalle commented 9 years ago

I’m not sure I understand, isn’t that an issue with civilframe:angular-jade?

mattiLeBlanc commented 9 years ago

Well, I think meteor-jade creates the flex="flex" attributes, right? If so, it shouldn't it compile it as 'flex' or 'flex=""' ? Angular-Jade package only calls your compile function, hence I thought the issues should be posted here.

mquandalle commented 9 years ago

No meteor-jade doesn’t compile to flex="flex". It compiles to <div flex>Foo</div> (as displayed on the Chrome debuggers tools) or <div flex="">Foo</div> (as displayed in the Firefox debuggers tools). This part is actually handled by Blaze (the runtime engine), all we do ensure is that div(flex) Foo in meteor-jade will do the same thing as <div flex>Foo</div> in Spacebars.

Do you have a link to point where civilframe:angular-jade actually call JadeCompiler?

mattiLeBlanc commented 9 years ago

I thought it was here: https://github.com/civilframe/meteor-angular-jade/blob/master/plugin.js#L11

mquandalle commented 9 years ago

Well no, this jade comes from NPM not mquandalle:meteor-jade. I encourage you to open an issue at https://github.com/civilframe/meteor-angular-jade

mattiLeBlanc commented 9 years ago

okay, sorry for the confusion. I thought you where the Jade master :)