Reputation: 67
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?
Upvotes: 0
Views: 356
Reputation: 1260
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:
<div class="container-modal-thing">
<cx-login></cx-login>
<cx-login-register></cx-login-register>
</div>
You would also need to import the LoginModule
and/or LoginRegisterModule
in the component that declares the our custom container component.
Upvotes: 0