-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
I'm trying to learn and test out one of your code samples of using ractive-load plugin.
http://examples.ractivejs.org/donut-charts
I reproduced all the code on my local machine, ran python simpleHTTPserver as my own webserver, etc.
When I tried to viewing it in my web browser, i got following errors in the console log.
Uncaught (in promise) Error: Ractive.load() error: Could not find dependency "ractive-transitions-fade". It should be exposed as Ractive.load.modules["ractive-transitions-fade"] or window["ractive-transitions-fade"
Why is it complaining about the promises? Is it because I'm using a different web server than Node/Express?
In my JS code, I simply wrote code like this(as per your existing samples)
Ractive.load('BaseView.html').then(function (BaseView) {
var ractive = new BaseView({
el: 'main',
data: getData()
});
});
function getData () {
return {
months: [
{ name: 'January', points: { dogs: 4, cats: 3, rabbits: 7 } },
{ name: 'February', points: { dogs: 2, cats: 7, rabbits: 3 } },
{ name: 'March', points: { dogs: 5, cats: 4, rabbits: 6 } },
{ name: 'April', points: { dogs: 6, cats: 8, rabbits: 4 } },
{ name: 'May', points: { dogs: 8, cats: 9, rabbits: 5 } },
{ name: 'June', points: { dogs: 3, cats: 2, rabbits: 2 } },
{ name: 'July', points: { dogs: 4, cats: 4, rabbits: 8 } },
{ name: 'August', points: { dogs: 2, cats: 5, rabbits: 9 } },
{ name: 'September', points: { dogs: 3, cats: 6, rabbits: 4 } },
{ name: 'October', points: { dogs: 7, cats: 2, rabbits: 7 } },
{ name: 'November', points: { dogs: 5, cats: 8, rabbits: 5 } },
{ name: 'December', points: { dogs: 1, cats: 0, rabbits: 7 } }
]
};
}
Metadata
Metadata
Assignees
Labels
No labels