Page History
...
Code Block | ||
---|---|---|
| ||
constructor(private http: HttpClient, private router: Router, private rendererContext: RendererContextService) { this.rendererContext.setComponentMapping({ 'angular-magnolia-int:pages/home': HomeComponent, 'angular-magnolia-int:pages/about': AboutComponent, 'angular-magnolia-int:components/title': TitleComponent, 'angular-magnolia-int:components/componentWithArea': ComponentWithAreaComponent, 'angular-magnolia-int:components/navigation': NavigationComponent, }); // refresh the content on navigation event this.router.events.subscribe((event) => { if (event instanceof NavigationEnd) { this.getContent(event.url); } } |
Mapping between Magnolia and ReactJS
...
Code Block | ||
---|---|---|
| ||
const COMPONENTS = {
'sample-light-module:components/title': Title,
'sample-light-module:components/text-image': TextImage,
'sample-light-module:components/nested': Nested,
'sample-light-module:components/navigation': Navigation
};
export default COMPONENTS; |
Overview
Content Tools