Azure-Samples / active-directory-b2c-advanced-policies

Sample for use with Azure AD B2C with Custom Policies.
http://aka.ms/aadb2ccustom
MIT License
217 stars 145 forks source link

Angular8/Vue custom component not loading in google sites in chrome browser #71

Open athulya-ratheesh opened 3 years ago

athulya-ratheesh commented 3 years ago

I have created an angular 8 custom component for pages in my Google site website. I have included the component as an embedded code in google sites.

Initially it was loading correctly in google sites but most recently the pages are not correctly rendering in chrome. We didn't change any configurations but it seems to be not working for both Vue and angular components. When trying with other browsers it seems good. What can be the issue?

Here is the embedded code for google site website


<html>
<style>
/* Center the loader */
#loader {
   position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid #3498db;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Add animation to "page content" */
.animate-bottom {
  position: relative;
  -webkit-animation-name: animatebottom;
  -webkit-animation-duration: 2s;
  animation-name: animatebottom;
  animation-duration: 2s
}

@-webkit-keyframes animatebottom {
  from { bottom:-100px; opacity:0 } 
  to { bottom:0px; opacity:1 }
}

@keyframes animatebottom { 
  from{ bottom:-100px; opacity:0 } 
  to{ bottom:0; opacity:1 }
}
#commonapps {
  display: none;
  text-align: center;
}
</style>
<script src="https://unpkg.com/vue"></script>
<script src="https://<base url>/common-apps.js"></script>
<script type="text/javascript">
setTimeout(function(){
var x = window.localStorage.getItem('email');
console.log(x);
if(x==null || x==undefined){
window.open("https:<gsuiteURL>",'_blank');
return false;
}
document.getElementById("commonapps").innerHTML='<common-apps-manage-requests></common-apps-manage-requests>';
  document.getElementById("loader").style.display = "none";
  document.getElementById("commonapps").style.display = "block";
}, 2000);
</script>
<div id="loader"></div>
<div  style="width: 100%; height:79% !important; display:none; " id="commonapps" class="animate-bottom">
</div>
</html>