A view is a visual representation of a model. It accesses data through the model and specifies how that data should be presented. It maintains consistency in its presentation when the model changes, which can be either through a push model, where the view registers itself with the model for change notifications, or a pull model, where the view is responsible for calling the model when it needs to retrieve the most current data. In this recipe, we will learn how to create our first view to render the list of employees.
Creating your first view
How to do it...
- Move to $GOPATH/src/my-first-beego-project/views and create dashboard.tpl and copy the following content:
<!DOCTYPE html>
<html>
<body>
<table...