I am getting error like: Uncaught TypeError: Cannot read property \'__webglFramebuffer\' of null
when i am going to another page linked with the page wh
You are getting this error because you do not destroy the viewer instance on the page you left, so when receiving event such as page resize the viewer will try to re-render and since the WebGL context has been destroyed it will fire this error.
Simply place some cleanup handler called when you navigate away from the viewer page, depending on which version of angular you are using you should find how to that easily, then place following code to cleanup the viewer:
// assumes this.viewer contains your viewer, your code might be different ...
// make sure viewer has been created
if (this.viewer) {
// I added this to handle some specific cases
if(this.viewer.impl.selector) {
this.viewer.tearDown()
this.viewer.finish()
this.viewer = null
}
}