Cant preview prismic page in my angular application

We followed all the steps in guide and troubleshooting.
Still unable to preview my prismic page in my configured website

Hi Devashish,

Welcome to the community!

Can you describe to me further what behaviour or errors you are actually experiencing, preferably with screenshots or screen recordings?

Thanks.

I can see the toolbar but content is not displayed on page.

It looks like it’s not redirecting from the preview page. Have you set up you link resolver to include all the correct paths?
https://prismic.io/docs/javascript/beyond-the-api/link-resolving

In my case, I can’t redirect to “/” as it automatically will redirect to “/login” page which is existing behaviour.
Is it possible for you to help me on a call?
May be a google meet call or something.

From experience I find working through text chat like this much more effective.

But this sounds like your issue. If the link resolver cannot be accessed to direct the data to the correct page then it won’t work.

Can you share with me your link resolver code? Also if you could tell me the different routes that you custom types use in your project that would be great.

Firstly I need to understand which page should it redirect to?
Should there be any code to display prismic content on that page?

The link resolver is used for redirecting any content that comes from prismic to the pages in your local project. Usually based on custom types or uid values. So you create the logic to send the data to the correct page.

We’ve created a series of articles for Angular with one specifically about previews, check it out and let me know it helps :slight_smile:

Thanks phil,

Do you have a similar example of .net rest API?

I followed the approach to get the preview token from url and get the document via rest API in .net.

I could do it for published content. But I need help for unpublished content.
That is the reason I asked for example of .net rest API. Can you please help?

Hi Devashish,

Did you manage to get this working? I sorry about the late reply, this on slipped away from me, I can only apologise.

The final issue you described, "the unplublished content previews" sounds like the preview script wasn't included in your 404 page.

Can you confirm this?