{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3160","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3160/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3160/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3160/events","html_url":"https://github.com/Starcounter/Starcounter/issues/3160","id":121239272,"number":3160,"title":"How to trigger a model change event in JS","user":{"login":"jwillmer","id":1503577,"avatar_url":"https://avatars.githubusercontent.com/u/1503577?v=3","gravatar_id":"","url":"https://api.github.com/users/jwillmer","html_url":"https://github.com/jwillmer","followers_url":"https://api.github.com/users/jwillmer/followers","following_url":"https://api.github.com/users/jwillmer/following{/other_user}","gists_url":"https://api.github.com/users/jwillmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwillmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwillmer/subscriptions","organizations_url":"https://api.github.com/users/jwillmer/orgs","repos_url":"https://api.github.com/users/jwillmer/repos","events_url":"https://api.github.com/users/jwillmer/events{/privacy}","received_events_url":"https://api.github.com/users/jwillmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-12-09T13:32:00Z","updated_at":"2015-12-10T07:35:29Z","closed_at":null,"body":"With this code I can access the model in JS\r\n\r\n```js\r\n  <script model=\"{{model}}\">\r\n            (function () {\r\n                var scriptElement = document.currentScript;\r\n                var model = scriptElement.model;\r\n                // ...\r\n```\r\n\r\nBut how can I trigger an model change event?\r\n\r\nRelated Issue: [How to get a event in JS if some JSON property changes?](#3145)"},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/163523847","html_url":"https://github.com/Starcounter/Starcounter/issues/3160#issuecomment-163523847","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3160","id":163523847,"user":{"login":"miyconst","id":6435556,"avatar_url":"https://avatars.githubusercontent.com/u/6435556?v=3","gravatar_id":"","url":"https://api.github.com/users/miyconst","html_url":"https://github.com/miyconst","followers_url":"https://api.github.com/users/miyconst/followers","following_url":"https://api.github.com/users/miyconst/following{/other_user}","gists_url":"https://api.github.com/users/miyconst/gists{/gist_id}","starred_url":"https://api.github.com/users/miyconst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miyconst/subscriptions","organizations_url":"https://api.github.com/users/miyconst/orgs","repos_url":"https://api.github.com/users/miyconst/repos","events_url":"https://api.github.com/users/miyconst/events{/privacy}","received_events_url":"https://api.github.com/users/miyconst/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T07:35:29Z","updated_at":"2015-12-10T07:35:29Z","body":"You can define `partial` class for lists as well:\r\n\r\n```cs\r\n[Page_json.Products]\r\npartial class PageProductItem : Json, IBound<Anything> {\r\n    protected override void HasChanged(TValue property) {\r\n        base.HasChanged(property);\r\n    }\r\n}\r\n```\r\n\r\nThe `IBound` and `Json` is not required, unless you need it."}}