aurelia icon indicating copy to clipboard operation
aurelia copied to clipboard

Ability to extract all expressions inside the template to properties on the VM

Open brandonseydel opened this issue 3 years ago • 2 comments

🙋 Feature Request

Ability to extract all expressions inside the template to properties on the VM

🤔 Expected Behavior

Properties get removed from HTML and placed onto the VM using an incremental property naming algo.

😯 Current Behavior

💁 Possible Solution

🔦 Context

Allows for some type-safety to happen when bundling.

💻 Examples

brandonseydel avatar Aug 18 '22 14:08 brandonseydel

@3cp :)

brandonseydel avatar Aug 18 '22 14:08 brandonseydel

Sounds doable and sounds like what our AOT had in mind. cc @bigopon

To fully support type check in template, we need to parse binding scopes (if/repeat/with create new child scope), this is different than JavaScript variable scope. Also our scope has a chain of parentContext and overrideContext, which is similar but not same as JS's prototype chain.

3cp avatar Aug 18 '22 23:08 3cp