07-20-2023, 02:00 PM
I'm currently diving into Angular2 and see a lot of potential in it.
Nevertheless I'm asking myself, if Angular2 is a good candidate for classic frontend development in CMS projects, where the content and content structure comes from the editor and therefore from the server.
I've read a lot about the Angular2 templating system.
Now to my question:
You initiate an Angular2 app by adding the AppComponents selector tag into the DOM, like so:
<body>
<my-app>
Loading...
</my-app>
</body>
Now all the apps content is somewhere hidden in the Angular2 templates for all the components.
In the real world a CMS would output all the content information within the DOM, like so:
<body>
<my-app>
<editor-content>
<h1>Some articles heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<a href="#">A fancy link</a>
</editor-content>
</my-app>
</body>
When Angular2 starts, all the initial content is like thrown away and replaced by the template defined in AppComponent.
How can I tell AppComponent, that it should initialize using the content from the CMS?
Is there even a way to achieve this?
Nevertheless I'm asking myself, if Angular2 is a good candidate for classic frontend development in CMS projects, where the content and content structure comes from the editor and therefore from the server.
I've read a lot about the Angular2 templating system.
Now to my question:
You initiate an Angular2 app by adding the AppComponents selector tag into the DOM, like so:
<body>
<my-app>
Loading...
</my-app>
</body>
Now all the apps content is somewhere hidden in the Angular2 templates for all the components.
In the real world a CMS would output all the content information within the DOM, like so:
<body>
<my-app>
<editor-content>
<h1>Some articles heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<a href="#">A fancy link</a>
</editor-content>
</my-app>
</body>
When Angular2 starts, all the initial content is like thrown away and replaced by the template defined in AppComponent.
How can I tell AppComponent, that it should initialize using the content from the CMS?
Is there even a way to achieve this?