Refactor the canvas creation into an Angular value provider.