summaryrefslogtreecommitdiffstats
path: root/portal-FE-os/src/app/shared/utils
diff options
context:
space:
mode:
authorSudarshan Kumar <sudarshan.kumar@att.com>2020-01-31 20:08:08 +0530
committerSudarshan Kumar <sudarshan.kumar@att.com>2020-02-04 07:38:53 +0000
commit3f7386d4245f9a05db961440ebf80d97d788f902 (patch)
tree1952962fe532ae8486abe4746e8a345608e40f89 /portal-FE-os/src/app/shared/utils
parente0b464f75666b80976466437fa1057c3b4efd39f (diff)
Added portal-FE-os components
Removed layout from portal-FE-os and added new components in portal-fe-os Issue-ID: PORTAL-795 Change-Id: I3d7f93fa22a7935f9e73ed96802495019aabc129 Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'portal-FE-os/src/app/shared/utils')
-rw-r--r--portal-FE-os/src/app/shared/utils/utils.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/portal-FE-os/src/app/shared/utils/utils.js b/portal-FE-os/src/app/shared/utils/utils.js
new file mode 100644
index 00000000..3c99f4ac
--- /dev/null
+++ b/portal-FE-os/src/app/shared/utils/utils.js
@@ -0,0 +1,21 @@
+function getCookies() {
+ var cookies = { };
+ if (document.cookie && document.cookie != '') {
+ var split = document.cookie.split(';');
+ for (var i = 0; i < split.length; i++) {
+ var name_value = split[i].split("=");
+ name_value[0] = name_value[0].replace(/^ /, '');
+ cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
+ }
+ }
+ return cookies;
+}
+
+function getContextRoot(){
+ var pathName = window.location.pathname;
+ var pathArray = pathName.split( '/' );
+ var contextRoot='';
+ if(pathArray.length!=0 && pathArray.length>=1)
+ contextRoot = pathArray[1];
+ return contextRoot;
+} \ No newline at end of file