Note online

你在这里

Transform PHP Vars to JavaScript For Drupal 8

Transform PHP Vars to JavaScript For Drupal 8

Often, you'll find yourself in situations, where you want to pass some server-side string/array/collection/whatever
to your JavaScript. Traditionally, this can be a bit of a pain - especially as your app grows.

This package simplifies the process drastically.

Installation

Download vars_to_javascript to module direcotry, then run composer install