Tony
Tony

Reputation: 243

Server side rendering with Angular cli

I just want to know if is possible to run Angular2 cli with server rendering similar to Angular2 universal?

The problem is that the crawler can not read the sites with Angular2 cli and this is important for SEO.

Is it possible to add easily angular universal into angular cli or it is from conf different?

Upvotes: 5

Views: 405

Answers (1)

Kim Merino
Kim Merino

Reputation: 286

Angular-cli can now compile your ng generated code into universal code.

The full how-to guide on how to prepare your angular 2 code for a universal build can be found here

As for SEO, Angular 4 has a built in Meta service that is imported from the platform-browser module. If you're looking for a meta service for angular 2, you can try using ng2-meta to insert meta tags for SEO.

Great news for us devs that have an angular-cli generated project!

Upvotes: 1

Related Questions