Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reload page angular one time

ngOnInit() {
  if (!localStorage.getItem('foo')) { 
    localStorage.setItem('foo', 'no reload') 
    location.reload() 
  } else {
    localStorage.removeItem('foo') 
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reload #page #angular #time
ADD COMMENT
Topic
Name
9+7 =