@inPath checks if the current request url has a parent address which is supplied
within the @inPath() directive. If the parent address matches, the second argument
supplied will be returned. The example below shows how the @inPath() directive can be applied in template files
Assumed Page 2: http://localhost/docs/some/page @inPath('docs.some', 'hi') returns "hi" Assumed Page 1: http://localhost/docs/resource/item @inPath('docs.some', 'hi') returns ""
<a href="@domurl('docs/resource')" class="@inPath(':dom-path','active')">
<a href="@domurl('docs/users')" class="@inPath(':dom-path','active')">
active will be returned once the relative @domurl() path is
visited. This happens because the :dom-path will automatically test for the last path supplied on
@domurl, saving us the time to rewrite urls. This behaviour is good for navigation bar menus.
Also, for this to work, the @inPath() must come immediately after @domurl() directive is used. Now
it even gets easier when only one argument is supplied. If it is only one single argument supplied on @inPath(), then
@inPath will automatically call the :dom-path argument on itself. This can save a lot of time when building
web applications. This means that the code above can be rewritten as shown below
<a href="@domUrl('docs/resource')" class="@inPath('active')">
<a href="@domUrl('docs/users')" class="@inPath('active')">