我将聚合物2.0升级为聚合物3.0。
现在,使用调制器工具更新代码后,我收到以下错误:“未捕获的TypeError:Polymer.dom不是函数”。
var dateToday = new Date();
var currentYear = qy.helpers.formatTimeYear(dateToday); //is an string
// currentYear = Number(currentYear);
if (user.plan === 'advanced') {
console.info("Advanced User");
qy.userPlan = 'adv';
var qyApp = document.createElement('qy-app'); // cargamos la app advanced
//Polymer.dom(document.getElementById('app')).appendChild(qyApp);
var d = document.getElementById('app');
Polymer.dom(d).appendChild(qyApp);
} else {
console.info("Profesional User");
var qyApp = document.createElement('qy-app'); // cargamos la app for proffesional var qyApp = document.createElement('qy-appPR');
qy.userPlan = 'pro';
Polymer.dom(document.getElementById('app')).appendChild(qyApp);