kogarashisan / LiquidLava

Framework for building user interfaces
http://www.lava-framework.com/
MIT License
17 stars 3 forks source link

Allow to create "alias" properties in storage objects. Reason: this will allow to create better-looking attribute names for sugar. #183

Open kogarashisan opened 9 years ago

kogarashisan commented 9 years ago

For example: main attribute is called "is_active" (Boolean), alias will be called "active" (switch). solution: descriptor for alias property has flag "isAlias", for example: {active: {type: "Switch", isAlias: true}, ...}. Before <storage> tag and sugar parses the raw AST - they first collect a list of attributes, which have an alias, to restrict them. When TemplateWalker walks a template - it ignores properties with isAlias flag.