Giter VIP home page Giter VIP logo

aurelia-compiler's People

Contributors

aaike avatar charlespockert avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

aurelia-compiler's Issues

Error when using compile()

Getting TypeError: obj is undefined with that code when adding row:

markdown.setAttribute('if.bind', 'test');

app.html:

<side-bar if.bind="state.showNav" navigation.bind="nav.tree"></side-bar>

side-bar.js

import {bindable, noView} from 'aurelia-framework';
import {Compiler} from 'gooy/aurelia-compiler';

@noView
export class SideBar {

  static inject() {return [Compiler, Element]}

  @bindable navigation = null;
  test = true;

  constructor(compiler, element){

    this.compiler = compiler;
    this.element = element;



  }

  activate(){
    console.log("SideBar", "activate");
  }

  deactivate(){
    console.log("SideBar", "deactivate");
  }

  bind(context) {
    console.log("SideBar", "bind", this.navigation);

  }

  unbind() {
    console.log("SideBar", "unbind");
  }

  attached() {
    console.log("SideBar", "attached", this.navigation);

    var markdown = document.createElement("div");
    markdown.setAttribute('if.bind', 'test'); // triggers error
    this.element.appendChild(markdown);
    this.compiler.compile(markdown);

  }

  detached() {
    console.log("SideBar", "detached");

  }

}

Can't DI it into my class

I have the following:

import {Compiler} from 'gooy/aurelia-compiler';

 @autoinject
 export class PopoverErrorRenderer extends ErrorRenderer {

     compiler: Compiler;

     constructor(compiler: Compiler) {
         super();
         this.compiler = compiler;
     }
     ...

This generates a "badKeyError" in Dependency Injection.

Error: key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI? at Container.get [email protected]/aurelia-dependency-injection.js:473:15

Compatible with the latest release?

Is this library meant to be used with the latest aurelia release? I had some trouble installing this plugin and I saw the note that "this library will be refactored and parts of it will be included into the core", I wasn't sure if it was user error on my part or if I should be looking into using core functionality instead?

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.