I am using angular-universal in my PWA app for a SEOpurpose which is 
working fine, but it has the following issues

1). PWA app is not working in offline mode.
2). During first time load of the app, it flickers screen component (i 
think it is due to SSR)

So what I was thinking like if we are able to configure angular-universal 
like it will only process SSR on specific routes (i.e. product detail page) 
and rest of the routes will server as a normal angular app, so it will 
resolve screen flicker issue, also by default on root route it will work as 
normal angular app so PWA on offline mode will also work.


Is there any way to configure onSSR specific routes?


Here we can see that SSR is applying for every route:

app.set('view engine', 'html');
app.set('views', join(DIST_FOLDER, 'browser'));

app.get('*.*', express.static(join(DIST_FOLDER, 'browser')));

app.get('*', (req, res) => {
  res.render(join(DIST_FOLDER, 'browser', 'index.html'), { req });});

app.listen(PORT, () => {
  console.log(Node server listening on http://localhost:${PORT});});




-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to