go-tour: send file name on Run
TBR=dsymonds
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/81570046
diff --git a/static/js/controllers.js b/static/js/controllers.js
index 08550cf..a2e7e81 100755
--- a/static/js/controllers.js
+++ b/static/js/controllers.js
@@ -60,7 +60,8 @@
$scope.run = function() {
log('info', I18n.L('waiting'));
- Run(file().Content, $(".output.active > pre")[0]);
+ var f = file();
+ Run(f.Content, $(".output.active > pre")[0], {path: f.Name});
};
$scope.format = function() {
diff --git a/static/js/services.js b/static/js/services.js
index 29525d9..56a62c1 100755
--- a/static/js/services.js
+++ b/static/js/services.js
@@ -24,8 +24,8 @@
// Running code
factory('Run', function() {
- return function(code, output) {
- window.transport.Run(code, PlaygroundOutput(output));
+ return function(code, output, options) {
+ window.transport.Run(code, PlaygroundOutput(output), options);
}
}).