Loading Nota client - aerix-nl/nota GitHub Wiki

Requiring Nota client

It's recommended to use RequireJS, which is shipped with Nota, and always available from the server at /nota/vendor/requirejs/require.js

Once RequireJS is loaded, load it using:

require(['/nota/lib/client'], function(Nota) {
  // do something with Nota
};

Attempt to load

It's possible to try to load Nota client, and continue without. This is handy for templates that are also used outside of Nota, and should be used independently of whether Nota client can be loaded. This is handy for example for using templates in webapps, where they get their data from a different source, or for previewing the template by opening the template.html file from the file system.

The free example fiscal document template has implemented this behavior at the end of the main require script.