Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:09:24+00:00 2026-06-14T12:09:24+00:00

Few things I don’t get. According to KO documentation (and many posts here on

  • 0

Few things I don’t get.
According to KO documentation (and many posts here on SO), parentheses should be used when querying and writing observables. But when binding sub-properties it seems to me that it doesn’t matter if you use parentheses or not.

<span data-bind="text: selectedMessage() && selectedMessage().message().subject()"></span>
<span data-bind="text: selectedMessage() && selectedMessage().message().subject"></span>

= both return correct value.

Can anyone explain to me why this is?

Fiddle: http://jsfiddle.net/viktorb/DKg74/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:09:25+00:00Added an answer on June 14, 2026 at 12:09 pm

    If the binding value is an observable, KO “unwraps” it for you, so you don’t have to unwrap it yourself with the parentheses (or a call to ko.utils.unwrapObservable).

    In your 2nd example the binding value is: selectedMessage() && selectedMessage().message().subject. When this expression evaluates to the subject property, KO sees that the evaluated value is an observable, and so it unwraps it for you. (Internally this is probably just a call to ko.utils.unwrapObservable).

    But, since the expression doesn’t evaluate to the message property, which I’m assuming is also an observable, the parentheses for accessing that property are necessary (e.g. selectedMessage().message.subject wouldn’t work).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting with obj-c and there's a few things I don't get. First of
I am trying to separate a few things in here. I have a program
There are a few things I don't understand about the output of git clone.
I am trying a few things in Powershell and what I don't manage to
I have tried quite a few things but I still don't know how can
I recently started working with CakePHP but there are a few things I don't
There have been a few things in web app's that I don't like. First
I don't understand few things in following code. Why the length is set to
I have a few things in various different files that get called from different
There are a few things that I don't understand about iOS memory management. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.