doc fix in view.md guide registerJS instead of registerScript

fixes #774