I am new to Spartacus. I just want to show the Sing in / Register link in a popup on clicking one nav button. I don't want to modify any working/functionality of the link "Sign in / Register". How can we achieve this in Spartacus?
How to show the same Spartacus component but in a different place without using custom components
320 views Asked by Selva Ajitha At
1
The login component and register components are by default assigned to CMS components, but they can also be used by their selectors. If you need to wrap them in another component (i.e. modal), you could import them by their selectors. You would first create a container component that is opened on navigation click, and then add the login / register components inside the container component. For example:
You would also need to import the
LoginModule
and/orLoginRegisterModule
in the component that declares the our custom container component.