Reputation: 1
I have tried to execute this simple code in google apps script that uses angularjs.
Binding is not working. Do I have a mistake or angularJS is not supported in caja?
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script type="text/javascript">
angular.module('App', []);
function HelloCntl($scope) {
$scope.name = 'World';
}
</script>
<div ng-app="App">
<div ng-controller="HelloCntl">
Your name: <input type="text" ng-model="name"/>
<hr/>
Hello {{name || "World"}}!
</div>
</div>
Upvotes: 0
Views: 492
Reputation: 524
You need to include non-minified version of angular js. Google minifies it when generating final html.
You can use angular with following change in your appscript file.
var ui = HtmlService.createHtmlOutputFromFile('myPage')
.setTitle('My Title');
ui.setSandboxMode(HtmlService.SandboxMode.IFRAME);
Upvotes: 0
Reputation: 46802
If I refer to this post answered by a Google developer: How can I use Angular.js in a Google Apps Script served HTML site?
It is not.
Upvotes: 1