{"action":"closed","issue":{"url":"https://api.github.com/repos/aurelia/templating/issues/441","repository_url":"https://api.github.com/repos/aurelia/templating","labels_url":"https://api.github.com/repos/aurelia/templating/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/templating/issues/441/comments","events_url":"https://api.github.com/repos/aurelia/templating/issues/441/events","html_url":"https://github.com/aurelia/templating/issues/441","id":168290483,"number":441,"title":"enhance not working since RC was released","user":{"login":"tzimmerer","id":20720313,"avatar_url":"https://avatars.githubusercontent.com/u/20720313?v=3","gravatar_id":"","url":"https://api.github.com/users/tzimmerer","html_url":"https://github.com/tzimmerer","followers_url":"https://api.github.com/users/tzimmerer/followers","following_url":"https://api.github.com/users/tzimmerer/following{/other_user}","gists_url":"https://api.github.com/users/tzimmerer/gists{/gist_id}","starred_url":"https://api.github.com/users/tzimmerer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tzimmerer/subscriptions","organizations_url":"https://api.github.com/users/tzimmerer/orgs","repos_url":"https://api.github.com/users/tzimmerer/repos","events_url":"https://api.github.com/users/tzimmerer/events{/privacy}","received_events_url":"https://api.github.com/users/tzimmerer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-29T09:54:15Z","updated_at":"2016-08-01T08:41:51Z","closed_at":"2016-08-01T08:41:51Z","body":"Hello,\r\nI am working on a project where we insert a view in a screen and I need to enhance this view to bind the data with it. \r\nEverything seemed to work before I update to the last version\r\n\r\nWhat's happen now :\r\nIf there is a single tag in the view, nothing happen : \r\n![not working](https://cloud.githubusercontent.com/assets/20720313/17244577/e58e92c0-5582-11e6-9e54-157fb695ac7d.png)\r\n\r\nAnd when there is no tag : \r\n![working](https://cloud.githubusercontent.com/assets/20720313/17244583/ee411aaa-5582-11e6-929c-028cdc9d1c23.png)\r\n\r\nHere is the code of the enhancement (find on the Internet)\r\n\r\n```\r\nimport { inject, TemplatingEngine, createOverrideContext, ViewResources } from \"aurelia-framework\";\r\n\r\n@inject(TemplatingEngine, ViewResources)\r\nexport class AureliaCompilationService{\r\n\r\n constructor(templatingEngine, viewResources) {\r\n    this._templatingEngine = templatingEngine;\r\n    this._viewResources = viewResources;\r\n  }\r\n\r\n  compileView(element, ctx) {\r\n    if (element != null) {\r\n      let view = $(element).data('viewInstance');\r\n      if (element.querySelectorAll('.au-target').length === 0) {\r\n        if (this._viewResources) {\r\n          view = this._templatingEngine.enhance({\r\n            bindingContext: ctx,\r\n            overrideContext: createOverrideContext(ctx, ctx.$parent),\r\n            element: element,\r\n            resources: this._viewResources\r\n          });\r\n        } else {\r\n          view = this._templatingEngine.enhance({\r\n            bindingContext: ctx,\r\n            overrideContext: createOverrideContext(ctx, ctx.$parent),\r\n            element: element\r\n          });\r\n        }\r\n\r\n        $(element).data('viewInstance', view);\r\n\r\n      } else {\r\n        if(view.bind) {\r\n          view.bind(this, createOverrideContext(ctx, ctx.$parent));\r\n        }\r\n      }\r\n\r\n      if(view.attached) {\r\n        view.attached(); // attach it to the DOM\r\n      }\r\n    }\r\n  }\r\n\r\n\r\n}\r\n```\r\nAny idea ?"}}
{"actor":{"display_login":"tzimmerer"}}