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

Using Jade template with Angular-meteor, display issue #5

Closed
mattiLeBlanc opened this issue Aug 12, 2015 · 3 comments
Closed

Using Jade template with Angular-meteor, display issue #5

mattiLeBlanc opened this issue Aug 12, 2015 · 3 comments

Comments

@mattiLeBlanc
Copy link

(function(){angular.module('angular-meteor').run(['$templateCache', function($templateCache) {$templateCache.put('client/index2.html', '
JADE Nothing here

');}]); })();

This is what I get when I reference a 'sometemplate.ng.jade' as sometemplate.html as suggested.

Code

import {Component, View, bootstrap} from 'angular2/angular2';

@Component({
  selector: 'app'
})
@View({
  // template: "<p>Hello World!2</p>"
  templateUrl: 'client/index2.html'
})
class Socially {}

bootstrap(Socially);

index2.ng.jade file:

p JADE Nothing here

*Edit:
So far I can see that the results string you create and feed to the compileStep.addJavascript function is just literally printed and not executed.

@pbastowski
Copy link
Collaborator

What you are doing "wrong" is you're using actual Angular2. This JADE package works with Angular1.

If you want Angular2-ish syntax then try the angular2-now library.

@mattiLeBlanc
Copy link
Author

That's quick. Thanks.
Okay, I didn't realise it was for Angular 1 only.
I want to use Angular 2 and am so used to using Jade format in my other Meteor projects. Following the tutorial (http://angular-meteor.com/tutorials/angular2/bootstrapping) to move over from A1 to A2 and have to switch back to HTML.
Any chance to convert this package for A2 support?

@alexnsolo
Copy link
Owner

@mattiLeBlanc I will make a new issue for that request: #6

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants