Try our conversational search powered by Generative AI!

EPiServer WebCMS with Angular JS

Hi, We are using Angular JS as SPA and we would like to use EPI as CMS. How can that be done? Any idaes? Can the content marketers still use the WYSIWYG kind of editor for this kind of setup? Many thanks, Dharmi
Feb 02, 2016 17:33

Expose EPi content by REST api probably by using .NET web api to build the SPA.

Build wysiwyg support by creating simple templates that are mostly mocked data except for the data you are currently editing is probably the fastest approach?

Feb 02, 2016 17:49

...then block access to the mockup pages that are used for editor wysiwyg for normal users.

Feb 02, 2016 18:07

Remember to take into account SEO, browser bookmarks etc if you go this way.

Not the easiest road to travel so to speak...

Feb 02, 2016 18:13
Thanks Daniel for the prompt response. If you can block access to the mockup pages, does that also mean you can use EPI as SPA for open domain and for the close domain you can use Angular JS as SPA within the same EPI instance? What are the trade-offs?
Edited, Feb 03, 2016 11:47

It will be basically that you build two sites. 

1. SPA website based on Angular for the users. Angular consumes WebAPI REST API to get the data it needs. For instance, list of products and detail view.  

2. Make it possible to get wysiwyg support for editors by creating very simple standard EPiServer templates in MVC (or Webforms). No SPA here. Just reuse the same css and html structure that you have for 1 but with mocked data except for the one you are editing. Let's say you want to edit a product. Make a productcontroller and view where the product detail information is gotten from epi but the rest of the information on the same page can be mocked (like menues etc). You may want to lock this "site" down in someway so users can't access those mocked pages. A separate editor server would of course be the best. Depends on how much you care if the users can "guess" some urls to those pages that editors will use for wysiwyg. Adding a location tag in web.config to lock it down to editor role might be good enough.  

It's probably possible to create fyll wysiwyg support for editors without standard page templates like in 2 but not in any easy way I know of at least.

Feb 03, 2016 12:12
Thanks again. Few more questions: 1. When you say that you need to build two sites do you have two seperate EPI instance or you can do it in one? 2. Are the EPI APIs available out of the box or they need to developed? 3. Which editor servers can you recommend? 4. What are the interdependecies to use the same EPI instance for the open and the close domain?
Edited, Feb 03, 2016 12:55

1. Depends on what security concerns you have. Normally you have only one instance of episerver that handles both public users and editors. It is possible to split them to different servers if you want increased security.

2. There exist webservice API to EPiServer out of the box but I would probably build a custom API using WEB API above the regular API to get the data in the form I want.

3. EPiServer doesnt need much performance on the servers out of the box. So if you decide to split servers its usually enough with a cheap servers for the editors since it will be low load on that one.

4. I don't get what you mean on this one sorry...

Feb 03, 2016 13:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.