-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
Description
When I create a simplified example of the example on the Creating an Element documentation page:
import { Slim } from 'slim-js';
import 'slim-js/property-directive';
Slim.element(
'my-greeting',
/*html*/ `
<h1>Hello, {{this.who}}!</h1>
`,
class MyGreeting extends Slim {
constructor(who) {
super()
this.who = who;
}
}
);
Slim.element(
'my-app',
/*html*/ `
<my-greeting .who="{{this.who}}">
</my-greeting>
`,
class MyApp extends Slim {
who = "I am the one and only"
}
);I expect that this.who will be set with the .who property, but whatever I do, it stays undefined.
I guess I don't understand the concept of the .who property, could you explain how this works?