GithubHelp home page GithubHelp logo

meteor-angular-jade's People

Contributors

akbach avatar alexnsolo avatar hlehmann avatar pbastowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

meteor-angular-jade's Issues

Using Jade template with Angular-meteor, display issue

(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.

flex becomes flex="flex" which breaks in Angular Material for Meteor

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

Foo

It should just stay

Foo

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?

Uncaught ReferenceError: Template is not defined

Hi,
since I started a new project today, based on one of a couple of months old using Angular + Meteor and Jade with packages:
mquandalle:jade
civilframe:angular-jade

I ran into the following issue while running the project:
Uncaught ReferenceError: Template is not defined

The error happens in

(function(){
      Meteor.startup(function() { $('body').attr({"layout":"column"}); });
      Template.body.addContent((function() {
  var view = this;
  return HTML.Raw('<div ui-view="app" layout="column" flex="flex"></div>');
}));
      Meteor.startup(Template.body.renderToDocument);

}).call(this);

my index file is a index.jade. This used to work. No I got a bright idea and changed it to index.ng.jade.
However, then it didn't load the index.ng.jade anymore.
When I convert my index to HTML, it works fine.

The update that I ran on my other project of a couple of months old was:
angular-meteor-data added, version 0.0.6
angular-templates added, version 0.0.2
angular:angular upgraded from 1.4.7 to 1.4.8
angular:angular-animate upgraded from 1.4.7 to 1.4.8
angular:angular-aria upgraded from 1.4.7 to 1.4.8
angular:angular-messages upgraded from 1.4.7 to 1.4.8
pbastowski:angular-babel added, version 1.0.6
tomi:upload-server upgraded from 1.3.2 to 1.3.3
urigo:angular upgraded from 1.0.3 to 1.2.3

After update it also stopped working.

Any idea what is happening?

index.ng.jade causing errors.

I have an index.html file with this in it:

<head>
  <title page-title></title>
  <base href="/">
</head>

<body ng-controller="MainCtrl as main" class="{{$state.current.data.specialClass}}">

<div>
  <div ui-view></div>
</div>

</body>

which converts to index.ng.jade

head
  title(page-title='')
  base(href='/')
body(ng-controller='MainCtrl as main', class='{{$state.current.data.specialClass}}')
  div
    div(ui-view='')

I'm getting this error, and I'm unsure why. Clearly the base is right there in the jade.

"Uncaught Error: [$location:nobase] $location in HTML5 mode requires a tag to be present!
http://errors.angularjs.org/1.4.5/$location/nobase"

Changing index.ng.jade back to index.html seems to keep my app running, I'd really like to use 100% jade in my angular-meteor app if possible.

-Mack

Not working with Meteor 1.3+

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?

New branch with ability to also create normal HTML templates like index.ng.jade

Some users, including myself, would like to be able to use this package to do all our JADE to HTML conversions, including index.ng.jade. Currently, this package outputs only JS files that populate the Angular $templateCache. So, I decided to enhance it a bit...

The changes I made in this version
https://github.com/pbastowski/meteor-angular-jade/tree/feature/templateCacheOff
allow this package to also output HTML code, which means that we can now also use it for index.ng.jade :)

To create normal HTML files just add the comment shown below as the first line in your JADE file and the plugin will create an HTML output file, instead of putting the HTML code in the Angular $templateCache.

// templateCache off
p The rest of your JADE code

Please note, this is only an early version and I have only done a bit of testing with this today on a couple of projects of mine.

It appears to work, but I don't feel confident yet that enough testing has been done to conclude that this mod is ready to be released to the public. I would like some people ( also looking at you @civilframe ), to test this for us and hopefully find any bugs and either fix them or report them to us for fixing.

I haven't made a pull request for this change, because I don't know how to make a PR that also creates a new branch and I don't want this in master until it's ready.

Include/extends don't work

Hi, I'm trying to include a mixins file, but it's giving me the following error:

/home/husam/.meteor/packages/civilframe_angular-jade/.0.0.3.1qmzzme++os+web.browser+web.cordova/plugin.compileJadeAngular.os/npm/compileJadeAngular/node_modules/jade/lib/parser.js:465:13:
   Jade:1
   > 1| include mixins
   2| 
   3| h2.welcome-message {{item.name}}
   4| form

   the "filename" option is required to use "include" with "relative" paths
   (compiling client/templates/editor/map-item-form.ng.jade)
   at Parser.resolvePath

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.