[Meteor] Erreur en console Firebug
Bonjour à tous, je commence sous Meteor, j'ai tenté de mettre en place des templates, la console Firebug me retourne ;
Citation:
Warning: Assigning helper with `Template.countofday.curmarket = ...` is deprecated. Use `Template.countofday.helpers(...)` instead.
Citation:
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
J'ai compris dans les grosses lignes, mais je ne vois rien pour y remédier et via google je n'ai rien trouvé de probant, une idée pour résoudre cela ? :)
/APP/
marketbitstamp.html
Code:
1 2 3 4 5 6 7 8 9 10 11
|
<head>
<title>Market Bitstamp</title>
</head>
<body>
<h1>Market BTC/USD</h1>
{{> bitstamp}}
</body> |
/APP/SERVER
server.JS
Code:
1 2 3 4 5 6 7
|
Meteor.methods({
'getbitstamp':function(){
return Meteor.http.call('GET','http://www.bitstamp.net/api/order_book');
}
}) |
/APP/CLIENT/BITSTAMP/
bistamp.css
bitstamp.html
Code:
1 2 3 4 5 6 7
|
<template name="bitstamp">
<div id="bitstamp_market">
<h1>Bitstamp Market</h1>
{{curmarket}}
</div>
</template> |
bitstamp.js
Code:
1 2 3 4 5 6 7 8
|
Template.bitstamp.curmarket = function(){
Meteor.call('getbitstamp',function(err,results){
console.log(results.content);
Session.set('marketbitstamp',JSON.parse(results.content));
});
return (Session.get('marketbitstamp'));
}; |
Je me suis inspiré de ce tuto : http://soren-ohnmeiss.developpez.com...uction-meteor/
et http://stackoverflow.com/questions/1...l-using-meteor
ainsi que de :
https://www.youtube.com/watch?v=FCVDTFuLvyo