How to clear Go.Js Canvas

I need to clear Go.js canvas and reload canvas once again. If i add the null or empty the it is throwing error. The div is already associated. i want to re-create the Go .Js layout.

please provide the suggestion.

When you say things like this without explaining exactly what you are doing, we have to guess what you are talking about. Please provide the code that is causing the error plus just enough context so that someone unfamiliar with your code can understand the situation.

But the basic answer to your question is to replace the Diagram.model with an empty model.