GithubHelp home page GithubHelp logo

Comments (6)

Serhioromano avatar Serhioromano commented on May 3, 2024

Not clear what would be the template? Is it URL string, HTML string or ID of the element? Or it is template content? Can you add practical example in real world scenario?

from framework.

Aaike avatar Aaike commented on May 3, 2024

This issue started when i asked this this question :

is it possible to add a behaviour to an element that will include other behaviours ?

for example if i have a bunch of behaviours

<div focusable hoverable draggable droppable></div>

i want to be able to write one attribute that will activate all these behaviours , something like

<div ui></div>

adding the ui behaviour would in turn enable all the behaviours specified above

from framework.

Aaike avatar Aaike commented on May 3, 2024

there is currently already a way to do something like this, where you should inject the child behaviours into one parent behaviour and initialize the child behaviours like this

constructor(Element, BoldTextBehavior, YellowBehavior){
    this.element = Element;
    this.bold = BoldTextBehavior;
    this.yellow = YellowBehavior;

    this.bold.element = this.element;
    this.yellow.element = this.element;
}

But allowing us to simply change the template before it is compiled would allow us to add attributes to the dom element and let aurelia initialize all the child behaviours based on those attributes.

from framework.

Aaike avatar Aaike commented on May 3, 2024

Has there been any progress around this ?

from framework.

EisenbergEffect avatar EisenbergEffect commented on May 3, 2024

Hasn't been done yet.

from framework.

EisenbergEffect avatar EisenbergEffect commented on May 3, 2024

The new view resource pipeline steps allow you to create resources that can be imported into a view which modify the template before compliation.

from framework.

Related Issues (20)

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.