Guest User

Untitled

a guest
Oct 17th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. example.com/customer1
  2. example.com/customer2
  3. etc..
  4.  
  5. app.customer1domain.net -> example.com
  6.  
  7. app.customer1domain.net (should rewrite to example.com/customer1)
  8.  
  9. @NgModule({
  10. imports: [
  11. RouterModule.forRoot([
  12. {
  13. path: ":customerName",
  14. component: CustomerWrapperComponent,
  15. children: [
  16. {
  17. path: "",
  18. component: CustomerComponent
  19. },
  20. {
  21. path: "content",
  22. component: ContentComponent
  23. },
  24. {
  25. path: "about",
  26. component: AboutComponent
  27. }
  28. ...
  29.  
  30. let customerName = this.route.snapshot.params["customerName"];
  31.  
  32. // User customerName to load customer specific content
  33.  
  34. http://example.com/customer1
  35. http://app.customer1domain.net
Add Comment
Please, Sign In to add comment