Skip to content

Computed properties no dependencies #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kenjiqq opened this issue Aug 4, 2014 · 1 comment
Closed

Computed properties no dependencies #107

kenjiqq opened this issue Aug 4, 2014 · 1 comment

Comments

@kenjiqq
Copy link

kenjiqq commented Aug 4, 2014

I think computed properties should support that you define a function that takes no arguments. So that it could be used to add a static value to all instances of that resource.

    DS.defineResource({
        name: 'user',
        computed: {
            someProp: [function () {
                return propValue;
            },
        }
    });

You could use the shorthand without the array, but then you get a warning that you should use the array method

@jmdobry
Copy link
Member

jmdobry commented Aug 4, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants