{"action":"created","comment":{"url":"https://api.github.com/repos/NativeScript/docs/pulls/comments/42985390","id":42985390,"diff_hunk":"@@ -162,11 +267,30 @@ A great way of using bindings is the option to create a custom expression (that\n </Page>\n ```\n \n-As seen from the example adding an expression extends a binding syntax a little bit. Actually it is a full binding syntax - first parameter is the source property (which will be listened for changes), second parameter is the expression that will be evaluated, there is one more (third) parameter which states if the binding is `twoWay` or not (as mentioned earlier by default xml declaration creates a `twoWay` binding). The result of the upper example is a TextField element that will display the value of the `sourceProperty` followed by \" some static text\" string.\n+The full binding syntax contains three parameters - first parameter is the source property, which will be listened to for changes, second parameter is the expression that will be evaluated and the third parameter states if the binding is `twoWay` or not. As mentioned earlier by default XML declaration creates a `twoWay` binding by default, so in our example the third parameter could be omitted. We can also omit the first parameter, but this will mean that the expression will be evaluted everytime we have a change in the bindingContext and not only when the property, we are interested in, has changed. Thus, the recommended syntax is to include two parameters in the XML declaration, as in our example - the property of interest and the expression, which has to be evaluated. \n \n-##Using converters in bindings\n \n-Speaking of a `twoWay` binding there is a common problem that origins in the different way of storing and displaying data. Probably the best example here is the date and time objects. Generally date and time information is stored as a number or a sequence of numbers (very useful for indexing, searching and other database operations), but this is not the best possible option for displaying date to the application user. Also there is another problem when user inputs a date (in our example user types into a TextField). The result of user input will be a string (TextField.text property) - representation of a date in a convenient to user's culture way usually using the same format as for display `DD.MM.YYYY`. This string should be converted to a correct date object. Lets see how this could be handled with NativeScript binding.\n+###Supported Expressions\n+NativeScript binding infrastructure supports different kind of expressions including:","path":"bindings.md","position":308,"original_position":308,"commit_id":"1e2453c2dd72eb20345ed7bef8caf48967970ecc","original_commit_id":"1e2453c2dd72eb20345ed7bef8caf48967970ecc","user":{"login":"ikoevska","id":3539221,"avatar_url":"https://avatars.githubusercontent.com/u/3539221?v=3","gravatar_id":"","url":"https://api.github.com/users/ikoevska","html_url":"https://github.com/ikoevska","followers_url":"https://api.github.com/users/ikoevska/followers","following_url":"https://api.github.com/users/ikoevska/following{/other_user}","gists_url":"https://api.github.com/users/ikoevska/gists{/gist_id}","starred_url":"https://api.github.com/users/ikoevska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikoevska/subscriptions","organizations_url":"https://api.github.com/users/ikoevska/orgs","repos_url":"https://api.github.com/users/ikoevska/repos","events_url":"https://api.github.com/users/ikoevska/events{/privacy}","received_events_url":"https://api.github.com/users/ikoevska/received_events","type":"User","site_admin":false},"body":"The NativeScript binding infrastructure...","created_at":"2015-10-26T12:12:49Z","updated_at":"2015-10-26T12:12:49Z","html_url":"https://github.com/NativeScript/docs/pull/167#discussion_r42985390","pull_request_url":"https://api.github.com/repos/NativeScript/docs/pulls/167","_links":{"self":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/comments/42985390"},"html":{"href":"https://github.com/NativeScript/docs/pull/167#discussion_r42985390"},"pull_request":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/NativeScript/docs/pulls/167","id":48334837,"html_url":"https://github.com/NativeScript/docs/pull/167","diff_url":"https://github.com/NativeScript/docs/pull/167.diff","patch_url":"https://github.com/NativeScript/docs/pull/167.patch","issue_url":"https://api.github.com/repos/NativeScript/docs/issues/167","number":167,"state":"open","locked":false,"title":"Data Binding article - restructured and rewritten","user":{"login":"N3ll","id":12541122,"avatar_url":"https://avatars.githubusercontent.com/u/12541122?v=3","gravatar_id":"","url":"https://api.github.com/users/N3ll","html_url":"https://github.com/N3ll","followers_url":"https://api.github.com/users/N3ll/followers","following_url":"https://api.github.com/users/N3ll/following{/other_user}","gists_url":"https://api.github.com/users/N3ll/gists{/gist_id}","starred_url":"https://api.github.com/users/N3ll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N3ll/subscriptions","organizations_url":"https://api.github.com/users/N3ll/orgs","repos_url":"https://api.github.com/users/N3ll/repos","events_url":"https://api.github.com/users/N3ll/events{/privacy}","received_events_url":"https://api.github.com/users/N3ll/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-21T14:00:40Z","updated_at":"2015-10-26T12:12:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ea34ddf5a7fda4b51dcfd3143d46efb9d231676","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NativeScript/docs/pulls/167/commits","review_comments_url":"https://api.github.com/repos/NativeScript/docs/pulls/167/comments","review_comment_url":"https://api.github.com/repos/NativeScript/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/docs/issues/167/comments","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/1e2453c2dd72eb20345ed7bef8caf48967970ecc","head":{"label":"NativeScript:data-binding-article","ref":"data-binding-article","sha":"1e2453c2dd72eb20345ed7bef8caf48967970ecc","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":20398807,"name":"docs","full_name":"NativeScript/docs","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/docs","description":"Docs, API Reference and Code Snippets for NativeScript","fork":false,"url":"https://api.github.com/repos/NativeScript/docs","forks_url":"https://api.github.com/repos/NativeScript/docs/forks","keys_url":"https://api.github.com/repos/NativeScript/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/docs/teams","hooks_url":"https://api.github.com/repos/NativeScript/docs/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/docs/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/docs/events","assignees_url":"https://api.github.com/repos/NativeScript/docs/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/docs/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/docs/tags","blobs_url":"https://api.github.com/repos/NativeScript/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/docs/languages","stargazers_url":"https://api.github.com/repos/NativeScript/docs/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/docs/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/docs/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/docs/subscription","commits_url":"https://api.github.com/repos/NativeScript/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/docs/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/docs/merges","archive_url":"https://api.github.com/repos/NativeScript/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/docs/downloads","issues_url":"https://api.github.com/repos/NativeScript/docs/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/docs/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/docs/releases{/id}","created_at":"2014-06-02T09:28:14Z","updated_at":"2015-10-20T14:12:08Z","pushed_at":"2015-10-22T13:16:36Z","git_url":"git://github.com/NativeScript/docs.git","ssh_url":"git@github.com:NativeScript/docs.git","clone_url":"https://github.com/NativeScript/docs.git","svn_url":"https://github.com/NativeScript/docs","homepage":null,"size":11353,"stargazers_count":223,"watchers_count":223,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":30,"forks":47,"open_issues":30,"watchers":223,"default_branch":"production"}},"base":{"label":"NativeScript:master","ref":"master","sha":"2071ca13a61191f891868bc95ad3fa16ab2b3fb0","user":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":20398807,"name":"docs","full_name":"NativeScript/docs","owner":{"login":"NativeScript","id":7392261,"avatar_url":"https://avatars.githubusercontent.com/u/7392261?v=3","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NativeScript/docs","description":"Docs, API Reference and Code Snippets for NativeScript","fork":false,"url":"https://api.github.com/repos/NativeScript/docs","forks_url":"https://api.github.com/repos/NativeScript/docs/forks","keys_url":"https://api.github.com/repos/NativeScript/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/docs/teams","hooks_url":"https://api.github.com/repos/NativeScript/docs/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/docs/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/docs/events","assignees_url":"https://api.github.com/repos/NativeScript/docs/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/docs/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/docs/tags","blobs_url":"https://api.github.com/repos/NativeScript/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/docs/languages","stargazers_url":"https://api.github.com/repos/NativeScript/docs/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/docs/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/docs/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/docs/subscription","commits_url":"https://api.github.com/repos/NativeScript/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/docs/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/docs/merges","archive_url":"https://api.github.com/repos/NativeScript/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/docs/downloads","issues_url":"https://api.github.com/repos/NativeScript/docs/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/docs/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/docs/releases{/id}","created_at":"2014-06-02T09:28:14Z","updated_at":"2015-10-20T14:12:08Z","pushed_at":"2015-10-22T13:16:36Z","git_url":"git://github.com/NativeScript/docs.git","ssh_url":"git@github.com:NativeScript/docs.git","clone_url":"https://github.com/NativeScript/docs.git","svn_url":"https://github.com/NativeScript/docs","homepage":null,"size":11353,"stargazers_count":223,"watchers_count":223,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":30,"forks":47,"open_issues":30,"watchers":223,"default_branch":"production"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/167"},"html":{"href":"https://github.com/NativeScript/docs/pull/167"},"issue":{"href":"https://api.github.com/repos/NativeScript/docs/issues/167"},"comments":{"href":"https://api.github.com/repos/NativeScript/docs/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/docs/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/docs/statuses/1e2453c2dd72eb20345ed7bef8caf48967970ecc"}}}}