0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
This commit is contained in:
Richard Harris 2019-01-04 14:03:01 -05:00
parent dcad65b118
commit f0b6be1355
4 changed files with 17 additions and 1 deletions

View File

@ -379,7 +379,7 @@ function readAttribute(parser: Parser, uniqueNames: Set<string>) {
parser.allowWhitespace();
const colon_index = name.indexOf(':');
const type = colon_index !== 1 && get_directive_type(name.slice(0, colon_index));
const type = colon_index !== -1 && get_directive_type(name.slice(0, colon_index));
let value: any[] | true = true;
if (parser.eat('=')) {

View File

@ -0,0 +1 @@
<h1>Hello {user.name}!</h1>

View File

@ -0,0 +1,9 @@
export default {
props: {
currentUser: { name: 'world' }
},
html: `
<h1>Hello world!</h1>
`
};

View File

@ -0,0 +1,6 @@
<script>
import Nested from './Nested.html';
export let currentUser;
</script>
<Nested user={currentUser}/>