title: Cocos2d-x HTML5 with Angular JS in Single page application
body: <p>I've got a Cocos2d-x html5 game developed, and it works fine.</p>
  
  <p>However I'm in the process of porting my front-end to SPA using angularjs. Therefore, there are no redirects, as pages are loaded dynamically.</p>
  
  <p>There is a problem with loading engine sources, as once it is loaded, and user goes to game for the second time, it cannot be launched again.</p>
  
  <p>It results in error:
  Cannot redefine property: POINT_ZERO</p>
  
  <p>To avoid this, when loading game second time I ommit engine sources and load only game related resources.</p>
  
  <p>But this line, initializing game:
  cc.setup(this.config['tag']);</p>
  
  <p>results in error:
  WebGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program</p>
  
  <p>Can I somehow remove all cocos scripts to be able to load it again?</p>
  
  <p>Or perform a silent reload without redirection, so that the whole page is not refreshed?</p>