Template directive: Res

The @res() directive is used to resolve the relative path of static files. It converts relative paths supplied to http protocols which are loaded with their relative script tags into the web application. The sample below illustrates how the directive works.
res()
  @res('res/file.css')  <script src="http://{domain}/res/file.css"></script>

  @res('file.js')  <link href="http://{domain}/file.js" rel="stylesheet" type="text/css"/> 
                  


From the above, each url is resolved into its own relative script tag through the url extension. Also, it is important to note that paths are validated before being added to web pages. Non-existing files are never added to the web page.