aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorTeddy Wing2017-02-03 19:50:40 +0100
committerTeddy Wing2017-02-03 19:50:40 +0100
commit0c4c9d3d1e91529c4bb9b4b410293f3c38756e6a (patch)
tree993636b721c1d196784eb311bf86dd36e16adf50 /app/assets/javascripts
downloadAngular-tutorial-0c4c9d3d1e91529c4bb9b4b410293f3c38756e6a.tar.bz2
Initial commit. Base Rails 5.0.1 project.
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/application.js16
-rw-r--r--app/assets/javascripts/cable.js13
-rw-r--r--app/assets/javascripts/channels/.keep0
3 files changed, 29 insertions, 0 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644
index 0000000..b12018d
--- /dev/null
+++ b/app/assets/javascripts/application.js
@@ -0,0 +1,16 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// compiled file. JavaScript code in this file should be added after the last require_* statement.
+//
+// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
+// about supported directives.
+//
+//= require jquery
+//= require jquery_ujs
+//= require turbolinks
+//= require_tree .
diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js
new file mode 100644
index 0000000..71ee1e6
--- /dev/null
+++ b/app/assets/javascripts/cable.js
@@ -0,0 +1,13 @@
+// Action Cable provides the framework to deal with WebSockets in Rails.
+// You can generate new channels where WebSocket features live using the rails generate channel command.
+//
+//= require action_cable
+//= require_self
+//= require_tree ./channels
+
+(function() {
+ this.App || (this.App = {});
+
+ App.cable = ActionCable.createConsumer();
+
+}).call(this);
diff --git a/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/assets/javascripts/channels/.keep