Hey guys, I have a very simple setup:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="shopify-api-key" content="{{ SHOPIFY_APP_API_KEY }}" />
<title>shopify_test</title>
<link rel="preconnect" href="https://cdn.shopify.com/" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>
<script src="https://cdn.shopify.com/shopifycloud/polaris.js"></script>
</head>
<body>
<s-app-nav>
<s-link href="/" rel="home">Home</s-link>
<s-link href="/second">Second</s-link>
</s-app-nav>
not working:<br/>
<s-link href="/second" target="auto">nothing happens</s-link><br/>
<s-link href="/second" target="_self">nothing happens</s-link><br/>
working:<br/>
<s-link href="/second" target="_blank">works</s-link><br/>
<s-link href="/second" target="_top">works</s-link><br/>
<s-link href="/second" target="_parent">works</s-link><br/>
</body>
</html>
If I remove the polaris.js
the admin navigation an the left side works well. Each click on Home
or Second
creates a request on my server. After adding polaris.js
no requests happen anymore, only the URL in the browser gets updated.
Also the <s-link>
with target auto
or _self
do nothing with polaris.js
loaded.
What do I miss? I also don’t understand if I have to use or if I can use as the documentation says here: Navigation
Or do I need a special “wrapper” or something to get the correct GET parameters or authentication header “Bearer …” into the requests?
Thanks so much for your help!