{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/6886","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/6886/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/6886/comments","events_url":"https://api.github.com/repos/angular/angular/issues/6886/events","html_url":"https://github.com/angular/angular/issues/6886","id":131345751,"number":6886,"title":"Missing an equivalent to Angular 1 $compile","user":{"login":"Beachovic","id":17065168,"avatar_url":"https://avatars.githubusercontent.com/u/17065168?v=3","gravatar_id":"","url":"https://api.github.com/users/Beachovic","html_url":"https://github.com/Beachovic","followers_url":"https://api.github.com/users/Beachovic/followers","following_url":"https://api.github.com/users/Beachovic/following{/other_user}","gists_url":"https://api.github.com/users/Beachovic/gists{/gist_id}","starred_url":"https://api.github.com/users/Beachovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Beachovic/subscriptions","organizations_url":"https://api.github.com/users/Beachovic/orgs","repos_url":"https://api.github.com/users/Beachovic/repos","events_url":"https://api.github.com/users/Beachovic/events{/privacy}","received_events_url":"https://api.github.com/users/Beachovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T13:23:32Z","updated_at":"2016-02-12T08:36:21Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to move from Angular 1 to Angular 2 beta. One of the things I did for Angular 1 was to write a wrapper around a third party grid. This grid allowed me to specify templates for columns so I was able to let the grid output Angular directives/bindings like for example ng-click for each row. These bindings of course only worked after I ran $compile on the DOM element created by the grid.\r\n\r\nNow I'm trying to do something similar with ng2 using for example (click) to try to bind to a method in my component. This seems to have the same problem of not being recognized by ng2 because it was added to the DOM after the \"parsing of the DOM for ng2 markers\" has already finished. But after searching for something like $compile to fix this I just came up with the answer that there is no equivalent. There was some suggestion to use DynamicComponentLoader but since I'm not the one who adds the elements to the DOM but the 3rd party library I don't think that will help me.\r\n\r\nIs there something I've missed or are there any plans to add something similar to $compile?\r\n\r\nThanks,\r\nStefan"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/183227750","html_url":"https://github.com/angular/angular/issues/6886#issuecomment-183227750","issue_url":"https://api.github.com/repos/angular/angular/issues/6886","id":183227750,"user":{"login":"dlamoris","id":3822760,"avatar_url":"https://avatars.githubusercontent.com/u/3822760?v=3","gravatar_id":"","url":"https://api.github.com/users/dlamoris","html_url":"https://github.com/dlamoris","followers_url":"https://api.github.com/users/dlamoris/followers","following_url":"https://api.github.com/users/dlamoris/following{/other_user}","gists_url":"https://api.github.com/users/dlamoris/gists{/gist_id}","starred_url":"https://api.github.com/users/dlamoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlamoris/subscriptions","organizations_url":"https://api.github.com/users/dlamoris/orgs","repos_url":"https://api.github.com/users/dlamoris/repos","events_url":"https://api.github.com/users/dlamoris/events{/privacy}","received_events_url":"https://api.github.com/users/dlamoris/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T08:36:21Z","updated_at":"2016-02-12T08:36:21Z","body":"I would also like to know if there's anything equivalent. In our Angular 1 app $compile is used extensively. The use case is we allow our users to author html content that can include directives that we defined and the content are saved and loaded from a database. Those directives will in turn load more html text that can contain directives and so on, or use different templates based on different conditions. The examples for DynamicComponentLoader I've run across seems to make this very cumbersome and hacky, will there be something that'll offer the functionality of $compile?\r\n\r\nThanks"}}