简体   繁体   中英

Dynamically creating Angular components

I have some HTML content that I'm injecting dynamically into my page (the content is from an external source). That content has certain placeholders (elements) that need to be replaced with Angular components and wired into my application. Is this possible with AngularJS?

Its possible in both angularjs and angular2

In angularjs you will create a directive and in angular2 you will create a component.

In angularjs you can also create a component now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM