Hello,
I want to give for every tenant possibility to have a public website so I need to implement a new Angular Module : WebSiteModule.
The idea is
if the url : {TENANCYNAME}.domaine.com redirect to WebSiteModule
if the url : {TENANCYNAME}.secure.domaine.com redirect to AccountModule / AppModule
Exemple :
Admin web app : <a class="postlink" href="https://simed.secure.simplybook.me/">https://simed.secure.simplybook.me/</a>
Public web site : <a class="postlink" href="https://simed.simplybook.me/v2/">https://simed.simplybook.me/v2/</a>
I spent some hours to make the redirection in the RootModule or the AppPreBootstrap , adding a new settings in
"remoteServiceBaseUrl": "api.domain.com", "appBaseUrl": "{TENANCY_NAME}-secure.domain.com", "tenantWebSiteUrl":"{TENANCY_NAME}.domain.com"
Any advice please ?
Thank in you in advance.
3 Answer(s)
-
0
@simedbn as far as I know, Angular loads modules according to given path (not the full url), see <a class="postlink" href="https://angular.io/guide/router">https://angular.io/guide/router</a>.
So, you need to create your public module as a seperate Angular app and deploy it into a different website which can be visited at <a class="postlink" href="https://simed.simplybook.me/v2/">https://simed.simplybook.me/v2/</a>.
-
0
Hello,
Thank you , i think for the moment i'm not gonna spent time on this , i will just add a new path like :
tenantname.domaine.com/ => WebSite
tenantname.domaine.com/app => AppModule
tenantname.domaine.com/account=> AccountModule.
-
0
@simedbn it is the easiest ways actually :)