Git Product home page Git Product logo

Comments (4)

adarshpastakia avatar adarshpastakia commented on May 27, 2024

@avrahamcool for that purpose I'm excluding all properties prefixed with a double underscore (__).
I haven't yet had the chance to spend time on the data-model and data-source implementations. maybe we should look into the possibility of adding a decorator '@Private' to declare the property definition as 'enumerable: false'

Object.defineProperty(this, {
   'propName': {
   writable: true,
   enumerable: false
   })

from aurelia-ui-framework.

avrahamcool avatar avrahamcool commented on May 27, 2024

indeed I saw that in the code.

but what about the properties that you want to bind into, and you don't want them to be active in the dirty checking/serialization etc..
it's ugly to have them with __ in the html/js.
a cleaner way would be to pass a parameter that tells the model to explicitly exclude them.

a Private decorator would suggest that a property is not accessible from outside of that class, in that case that not what we mean.
but the decorator approach is nice and elegant, maybe a different decorator name?

from aurelia-ui-framework.

adarshpastakia avatar adarshpastakia commented on May 27, 2024

I agree the current approach is a bit ugly but when I added it I was just looking for a quick-fix solution.

as for the name for a decorator, yes it must not say private instead something to signify non-serializable

from aurelia-ui-framework.

adarshpastakia avatar adarshpastakia commented on May 27, 2024

Added @serializable() decorator for UIModel properties.

Fixed in Version 4

from aurelia-ui-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.