Applications contain resources (images, scripts, styles, etc.), and they need to navigate between different pages with different URLs. In this chapter, we will explore how to create a more generic application.
A resource is anything that can be sent from the server to the client. Figure 3-1 presents different types of web resources, including:
Opa contains directives to embed resources. The simplest one is
The string given as the argument to this directive is a path to the resource, which can be relative to the directory from which the project will be compiled.
This directive acts as a function; that is, you can bind its result to a variable
logo) and use it in your program. The type of this variable is
which is an object that can be sent from the server in response to the client’s
Sometimes you may have several resources you want to use: for example, a
directory full of images. Instead of including each image one by one, you can use
This line of code will include all resources based on all ...