Create HTML elements during runtime in angular 2 + -


in angularjs using $compiler create html elements on fly during runtime in angular 2 + not able find easy way create it.

everyone recommending dynamically create component don't want create component dynamically add html elements dynamically existing component, ngmodel , events attached html elements , should work i.e. events should call respective function in existing component.

whether can achieve in angular 2+ or in react can such stuff?

you can create angular components @ runtime, not html elements. mean html elements must components. once component displayed, can not modify it's structure. thing can "hiding" elements inside component , display them when needed , may need.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -