5
votes

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?

1
universal-cli node is availableRoman C
Ok, and how can I add this to my existing angular cli project ?Tony
There's a lot of ways bu none of them works. Add details or problem, error, to clarify the question.Roman C
The problem is I have a huge project and I want to apply angular2 universalTony
@Tony I have the same issue. Did you solve your issue?Nilesh G

1 Answers

1
votes

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!