Rails 5 turbolinks 在安装后不工作 Angular 2

Rails 5 turbolinks don't work after installing Angular 2

我在以下几行中遇到错误:

# layouts/application.erb
<%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => 'reload' %>

提出:SyntaxError: [stdin]:1:1: reserved word 'var'

安装 Angular 2 使用 $ npm install

后发生

只需在 application.js

中只需要 需要的 个文件即可修复
//= require node_modules/angular2/bundles/angular2-polyfills
//= require node_modules/systemjs/dist/system.src
//= require node_modules/rxjs/bundles/Rx
//= require node_modules/angular2/bundles/angular2.dev
//= require_tree ./app