resolveΒΆ

This function resolves a fully qualified path to a local path based on your current location. It will never check if the path exists, just resolve it. This function supports both relative (with dot-references) and absolute paths.

resolve(path)
Arguments:
  • path (string) – Path to resolve using current location.
Returns:

The fully qualified resource path of the location.

Examples:

// Absolute path
var path1 = resolve('/cms/views/myview.html');

// Relative path
var path2 = resolve('myview.html');

// Relative path (same as above)
var path3 = resolve('./myview.html');

// Relative path
var path4 = resolve('../myview.html');