Вопрос

I'm getting started with JavascriptMVC, going through the rapid start todo sample application. I'm getting a 403 error on the first step. Here is my code:

todos.html

<html>
<head></head>
<body>
<ul id='todos'></ul>
<input id='editor' />
<script type='text/javascript'
        src='.../steal/steal.js?todos/todos.js'>
</script>       
</body>
</html>

todos.js

steal('jquery/class',
      'jquery/model',
      'jquery/dom/fixture',
      'jquery/view/ejs',
      'jquery/controller',
      'jquery/controller/route',
      function($){
     });

Any thoughts on what could be causing this error? I figure I must be able to access to the repository because it is 403 error, but I don't understand why there should be any authorization problem.

Это было полезно?

Решение

As long as this is your 'root/todos/' directory, use this:

<!DOCTYPE html>
<html>
<head></head>
<body>
  <ul id='todos'></ul>
  <input id='editor'/>
  <script src='../steal/steal.js?todos/todos.js'></script>
</body>
</html>

I think you have an extra dot inside:

  <script src='.../steal/steal.js?todos/todos.js'></script>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top