-2

I am very new to systemJS and trying to explore it. Cant we call require as shown in the below inside HTML. When i call require() function inside JS files it loads JS file properly but inside HTML file it does not work..

Below is the SystemJS code on my HTML

System.config({ map: { Customerx: 'Customer.js' }  });

SystemJS.import('Customerx').then(function (m) {
var x = require("Customerx"); //<-- this works inside JS files but not here why  });
Shivprasad Koirala
  • 27,644
  • 7
  • 84
  • 73
  • Please provide a [mcve]. Also, you should detail exactly how it does not work. What is the undesirable behavior you are getting? What do you expect? – Louis Sep 13 '16 at 16:36
  • 1
    I have got the answer and also marked the answer. I am very surprised even after putting code and clear reason the question has been marked as not clear. One of the reasons why SO is loosing its charm. – Shivprasad Koirala Sep 19 '16 at 20:33

1 Answers1

0

Closing this issue. Require() is not available on the windows its scoped in each file.

https://github.com/systemjs/systemjs/issues/1442

Shivprasad Koirala
  • 27,644
  • 7
  • 84
  • 73