Open dharmax opened 7 years ago
so the problem is that you can't mount an element that was previously registered?
Please keep in mind that in a module-based scenario, the .ts
file of an element must be imported before any mount occurs. E.g.
import "./my-tag"; // this registers the component
riot.mount("*");
That's what i did. As i said, i followed the execution into your code. It even seems like it executed the following line element.prototype.tagName = registerTag(compiled);
correctly.
i followed also the execution of the mount, and there i saw that it simply doesn't recognize the tag...
So i'm at lost..
it's difficult to say. The only thing that comes into my mind is having two riot
instances, you are registering in one but mounting with the other (just guessing).
If you can/want, setup a repo that I can clone and check.
It sounds very reasonable...i still don't see where riot was instantiated twice, though.
It is a private repository, but i can send you a tar/zip. it's very small, because it's in a boilerplate status. where can i send it to?
@dharmax sent it to nino.porcino@gmail.com
i sent it to you yesterday
yup I'm looking at it, but nothing so far.
Can you please confirm the correct way to build/run the project is:
node server/web-server
?
2016-11-24 12:16 GMT+01:00 avi notifications@github.com:
i sent it to you yesterday
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nippur72/RiotTS/issues/41#issuecomment-262752496, or mute the thread https://github.com/notifications/unsubscribe-auth/ACemK_ue2hdziLIqQz_Bsqy4DlCU-W23ks5rBXH4gaJpZM4K5H7q .
hi, yes, this is indeed the program to execute, sorry (after you do yarn install, typings install, compile with tsc and lessc)
On Thu, Nov 24, 2016 at 1:19 PM nino-porcino notifications@github.com wrote:
yup I'm looking at it, but nothing so far.
Can you please confirm the correct way to build/run the project is:
node server/web-server
?
2016-11-24 12:16 GMT+01:00 avi notifications@github.com:
i sent it to you yesterday
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nippur72/RiotTS/issues/41#issuecomment-262752496, or mute the thread < https://github.com/notifications/unsubscribe-auth/ACemK_ue2hdziLIqQz_Bsqy4DlCU-W23ks5rBXH4gaJpZM4K5H7q
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nippur72/RiotTS/issues/41#issuecomment-262753051, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-ezkGBcEsB3BVPPOH3XKqoOkBuf6F_ks5rBXKsgaJpZM4K5H7q .
Any new findings?
Same issue here... I use steal.js as module loader and even if I try to do everything in one file riot doesn't mount. I've looked if it isn't related to template or some issue with requests but everything downloads correctly only (I even tried calling riot.compile() with callback containing riot.mount()) riot.mount() returns empty array and nothing mounts.
Main.ts:
import riot = require('node_modules/riot/riot+compiler');
import './IDE';
riot.compile(() => {
let tags = riot.mount('*');
tags;
});
IDE.ts:
import * as Riot from 'riot-typescript';
import 'codemirror/lib/codemirror.css';
import * as CodeMirror from 'codemirror';
import * as EmmetCodemirror from 'emmet-codemirror';
@Riot.template('/_template/Administration/Templates/ACMS_IDE')
class IDE extends Riot.Element {
attention: string = "yay";
}
ACMS_IDE (twig template rendered from php server with symfony):
{% raw %}
<ide>
<div class="test">Testing, {{ attention }} please!</div>
</ide>
{% endraw %}
any suggestions? :)
i use jspm. i read the issues people have with riotts and jspm so i added riotts as a git submodule. i built a tiny component and i followed the execution in the debugger: