Resources inside a view
A view file can carry its own scripts and stylesheets, inline or external. Both are lifted out and added to
the document head when the view loads, so a view is a self-contained unit rather than markup that depends on
the host page having already loaded the right things.
<html>
<head>
<link rel="stylesheet" href="/css/products.css" />
<script id="productView">
console.log('loaded with the view');
</script>
</head>
<body>
<h1>Product</h1>
</body>
</html>
Inline script and style tags need an id. That is how Bindary recognises one it has already
registered, so revisiting a view does not add the same tag twice.
Whether these resources are kept between route changes depends on $bindary.caching and
$bindary.cacheInternalTags. See
where data lives for how caching behaves.