how can we print base_url in js file (in drupal)?
Drupal.settings.basePath
drupalSettings.path.baseUrl
You can use $base_path . See the Drupal JavaScript API Example in the Drupal.settings section.
$base_path
Source: https://habr.com/ru/post/1341345/More articles:Is there a common test suite for testing the ICollection / IEnumerable / IList modules? - .netWCF - Custom Client Request / XML Response - xmlHow to disable all touch input at the application, window or control level? - wpfUpdate WISP (Windows Ink Service Platform) registry changes with C # - c #NSWindow - right-click menu - objective-cFFMpeg runs on the command line, but not in PHP using exec (); - command-lineWhy is my class variable reinitialized with cattr_accessor (JRuby, Rails) - ruby | fooobar.comCannot read some PDF files using iTextSharp - c #question about free () in C - cAn IOC Foundation (.net) for Beginners? - dependency-injectionAll Articles