How can I use Angular.js in a Google Apps Script served HTML site?

angularjs, google-apps-script

Solution

You can use angular with following change in your appscript file.

var ui = HtmlService.createHtmlOutputFromFile('myPage')
  .setTitle('My Title');
ui.setSandboxMode(HtmlService.SandboxMode.IFRAME);

Problem

Is it possible to include and use Angular.js as part of a web app served using HtmlService in Google Apps Script or will caja sanitise it out? Additionally will it be possible to use Angular within the HtmlService templating method within Apps Script itself?

Original source