alexnsolo / meteor-angular-jade

Compile Jade templates for use in meteor-angular.
MIT License
14 stars 7 forks source link

Not working with Meteor 1.3+ #15

Closed mackbrowne closed 8 years ago

mackbrowne commented 8 years ago

I'm trying to get the socially angular 1 example working with this plugin. Perhaps with the new changes to angular1-meteor with the addition of typescript and npm, could something have gone wrong? Can anyone confirm if this plugin is working for them with the current version of angular-meteor?

mattiLeBlanc commented 8 years ago

It is working for me, angular 1.5. What issues are you running into? Do you name your files 'file.ng.jade'? And if you use ui-router, to you just reference the template as 'file.html'?

mackbrowne commented 8 years ago

Hello,

Yes I'm naming them ng.html. I'll try converting to jade and naming them with .html? Is that what you are suggesting?

On Aug 20, 2016 12:47 AM, "Matti LeBlanc" notifications@github.com wrote:

It is working for me, angular 1.5. What issues are you running into? Do you name your files 'file.ng.jade'? And if you use ui-router, to you just reference the template as 'file.html'?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/civilframe/meteor-angular-jade/issues/15#issuecomment-241179316, or mute the thread https://github.com/notifications/unsubscribe-auth/ABO2AOLfD4hFu5IggZRaWw-7npUBlpxHks5qhobFgaJpZM4Jo30S .

mattiLeBlanc commented 8 years ago

if you want to use Jade, you should name them template.ng.jade. Maybe I didn't understand your question?

mackbrowne commented 8 years ago

No no, I didn't understand your response I got it now. I was naming things with. Ng.html not template.ng.html. Will try that and get back to you

On Aug 20, 2016 12:55 AM, "Matti LeBlanc" notifications@github.com wrote:

if you want to use Jade, you should name them template.ng.jade. Maybe I didn't understand your question?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/civilframe/meteor-angular-jade/issues/15#issuecomment-241179714, or mute the thread https://github.com/notifications/unsubscribe-auth/ABO2ALsinp2gyMSbbZpy3F20HWrEzpEbks5qhojFgaJpZM4Jo30S .

mattiLeBlanc commented 8 years ago

uh,wait. Do not use template as a filename.Just read it as [templateName].ng.jade. Like userList.ng.jade, or checkout.ng.jade.

IF you use the Jade package and want to use a Jade template, your extension has to .jade. To get it to work in with Angular Meteor, you need to prefix it with .ng, like in the examples above.

mackbrowne commented 8 years ago

Will try and let you know

On Aug 20, 2016 1:00 AM, "Matti LeBlanc" notifications@github.com wrote:

uh,wait. Do not use template as a filename.Just read it as [templateName].ng.jade. Like userList.ng.jade, or checkout.ng.jade.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/civilframe/meteor-angular-jade/issues/15#issuecomment-241179877, or mute the thread https://github.com/notifications/unsubscribe-auth/ABO2AOfXa797Bxg5qJhm4efiP_c9-gy6ks5qhonkgaJpZM4Jo30S .

mackbrowne commented 8 years ago

Im attempting to add

meteor add civilframe:angular-jade

to this project - https://github.com/mackbrowne/meteor-angular-boilerplate

then I try converting a single file to jade formatting and renaming to .ng.jade, .jade, .ng.html, .html and any other combinations I thought would make sense. Nothing seems to work.

alexnsolo commented 8 years ago

@mackbrowne Please create a branch in your project where the package is not working, and I can take a look.

mackbrowne commented 8 years ago

Here is the fork of socially with 1 file changed to jade.

the file i converted to jade is found here

Thanks so much for taking the time to look.

mackbrowne commented 8 years ago

@civilframe got any time to look at this? I setup the branch you asked for.

Vanilla html is soo ugly!!

alexnsolo commented 8 years ago

@mackbrowne Meteor made some changes starting in version 1.3 that breaks the plugin. For now, the plugin will only work with Meteor 1.2 and earlier. Also, note that the plugin adds the jade files to the angular $templateCache - it doesn't actually put compiled jade files into your project structure, for you to import them. You would use templateUrl instead.

pbastowski commented 8 years ago

@mackbrowne I have created a package pbastowski:jade-templates, which is built for Meteor 1.3 and up. It does not put templates in the template cache and instead let's you import them as text that you can use with template. Check it out, as It may be suitable for your needs.

mackbrowne commented 8 years ago

@civilframe lol i just saw that you updated the documentation. The next person coming across this issue will really appreciate it.

@pbastowski not sure what I'd do without you this week. Thank you again and again.

alexnsolo commented 8 years ago

Thanks @pbastowski . For everyone stumbling on this issue, let me recommend using pbastowski:jade-templates.

mattiLeBlanc commented 8 years ago

Would this work the same for PUG?

pbastowski commented 8 years ago

@mattiLeBlanc The answer is yes, because PUG is just JADE under a new name, due to copyright issues.

mattiLeBlanc commented 8 years ago

Yes, I assumed so. Just putting it out their for the people that might have had this question :)