[MGNLFE-171] DOCS: Fallback component Created: 15/Feb/22  Updated: 01/Nov/22  Resolved: 01/Nov/22

Status: Closed
Project: Magnolia Frontend Helpers
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Martin Drápela Assignee: Martin Drápela
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
documentation
documents MGNLFE-101 Fallback component to be used when co... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLFE-366 DOCSub: Fallback component Sub-task Completed Martin Drápela  
MGNLFE-367 DOCSub: Fallback component (rv) Sub-task Completed Phong Le Quoc  
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: SaaS TPR - SPA
Sprint: DevX 22
Story Points: 1
Team: DeveloperX

 Description   

See MGNLFE-101 for background info.



 Comments   
Comment by Phong Le Quoc [ 19/Oct/22 ]

To use the new feature  

  • For Angular, in root.component.ts, SPAs must add the line below
this.editorContext.setFallbackComponent(value);
  • For React, in App.js, set fallbackComponent attribute = value in the config object
<EditablePage templateAnnotations={data.templateAnnotations} content={data.content} config={config} />
  • For Vue, in PageLoader.vue, SPAs must set fallbackComponent in config object
this.config.fallbackComponent = value

 

value is a function - that returns a component or a boolean value - or a boolean value.

Note: examples are from frontend-helper samples

Comment by Christopher Zimmermann [ 20/Oct/22 ]

plequoc can you please update the above. I think that is obsolete now right? cc: mdrapela 

Comment by Martin Drápela [ 01/Nov/22 ]

https://docs.magnolia-cms.com/headless/spa-development/fallback-component.html

Generated at Mon Feb 12 05:44:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.