Permalink
Browse files

fix(doc): fix html5 syntax

  • Loading branch information...
huochunpeng authored and EisenbergEffect committed Oct 8, 2018
1 parent c836af5 commit 8452a66aad4a0fca063b32a0185b9d80d3e3dc81
@@ -145,7 +145,7 @@ We can also use two-way data binding to communicate whether or not an element ha
<code-listing heading="bind-focus.html">
<source-code lang="HTML">
<template>
<input focus.bind="hasFocus" />
<input focus.bind="hasFocus">
${hasFocus}
</template>
</source-code>
@@ -161,10 +161,10 @@ We can also declare that certain parts of our markup will be referencing propert
<source-code lang="HTML">
<template>
<p with.bind="first">
<input type="text" value.bind="message" />
<input type="text" value.bind="message">
</p>
<p with.bind="second">
<input type="text" value.bind="message" />
<input type="text" value.bind="message">
</p>
</template>
</source-code>
@@ -296,7 +296,7 @@ Here's our basic "Hello World" that asks the user if they want to greet the worl
<source-code lang="HTML">
<template>
<label for="greet">Would you like me to greet the world?</label>
<input type="checkbox" id="greet" checked.bind="greet" />
<input type="checkbox" id="greet" checked.bind="greet">
<div if.bind="greet">
Hello, World!
</div>
@@ -311,7 +311,7 @@ instead of `if`.
<source-code lang="HTML">
<template>
<label for="greet">Would you like me to greet the world?</label>
<input type="checkbox" id="greet" checked.bind="greet" />
<input type="checkbox" id="greet" checked.bind="greet">
<div show.bind="greet">
Hello, World!
</div>
@@ -429,7 +429,7 @@ Two-way binding with arrays requires a special syntax due to the nature of the `
<code-listing heading="repeater-template-input.html">
<source-code lang="HTML">
<template>
<template>
<div repeat.for="i of dataArray.length">
<input type="text" value.bind="$parent.dataArray[i]">
</div>
@@ -157,7 +157,7 @@ Note that in the above code sample, the color of the square will not be updated,
<div square="${color}"></div>
<div square.bind="color"></div>
<input type="text" value.bind="color" />
<input type="text" value.bind="color">
</template>
</source-code>
</code-listing>
@@ -50,7 +50,7 @@ The following example shows an Aurelia view utilizing two-way databinding to an
<require from="./yes-or-no.html"></require>
<require from="./say-goodbye.html"></require>
<p>What is your name? <input type="text" value.bind="name & debounce" /></p>
<p>What is your name? <input type="text" value.bind="name & debounce"></p>
<yes-or-no question="Are you leaving?" answer.two-way="sayGoodbye"></yes-or-no>
<say-goodbye if.bind="sayGoodbye" name.bind="name"></say-goodbye>
</template>
@@ -61,7 +61,7 @@ The following example shows an Aurelia view utilizing two-way databinding to an
<source-code lang="HTML">
<template bindable="question, answer">
<p>
${question} <input type="checkbox" checked.bind="answer" />
${question} <input type="checkbox" checked.bind="answer">
</p>
</template>
</source-code>
@@ -208,10 +208,10 @@ Any properties or functions of the VM class may be used for binding within the c
<require from="./secret-message"></require>
<p>
Secret Message: <input type="text" value.bind="message" />
Secret Message: <input type="text" value.bind="message">
</p>
<p>
Allow Message to Destruct? <input type="checkbox" checked.bind="allowDestruction" />
Allow Message to Destruct? <input type="checkbox" checked.bind="allowDestruction">
</p>
<secret-message message.bind="message" allow-destruction.bind="allowDestruction" ></secret-message>
</template>
@@ -230,9 +230,9 @@ As your application grows, custom elements get complicated and often values that
<source-code lang="HTML">
<div>
First name:
<input value.bind="firstName" />
<input value.bind="firstName">
Last name:
<input value.bind="lastName" />
<input value.bind="lastName">
</div>
Full name is: "${firstName} ${lastName}"
</source-code>
@@ -308,9 +308,9 @@ Either using interpolation:
<let full-name="${firstName} ${lastName}"></let>
<div>
First name:
<input value.bind="firstName" />
<input value.bind="firstName">
Last name:
<input value.bind="lastName" />
<input value.bind="lastName">
</div>
Full name is: "${fullName}"
</source-code>
@@ -323,9 +323,9 @@ Or an expression:
<let full-name.bind="firstName + ' ' + lastName"></let>
<div>
First name:
<input value.bind="firstName" />
<input value.bind="firstName">
Last name:
<input value.bind="lastName" />
<input value.bind="lastName">
</div>
Full name is: "${fullName}"
</source-code>
@@ -340,9 +340,9 @@ Additionally, if there is a need to react to changes on both `fullName`, we can
<let to-binding-context full-name="${firstName} ${lastName}"></let>
<div>
First name:
<input value.bind="firstName" />
<input value.bind="firstName">
Last name:
<input value.bind="lastName" />
<input value.bind="lastName">
</div>
Full name is: "${fullName}"
</source-code>
@@ -34,7 +34,7 @@ describe('ViewLocator', () => {
describe('StaticViewStrategy', () => {
it('loads', (done) => {
let strategy = new StaticViewStrategy({
template: '<template><input value.bind="value" /></template>',
template: '<template><input value.bind="value"></template>',
dependencies: []
});
class El {}
@@ -70,7 +70,7 @@ describe('ViewLocator', () => {
});
it('sets formal "moduleId"', () => {
const strategy = new StaticViewStrategy('<template><input value.bind="value" /></template>');
const strategy = new StaticViewStrategy('<template><input value.bind="value"></template>');
expect(strategy.moduleId).toBeDefined();
});
});
@@ -101,7 +101,7 @@ describe('ViewLocator', () => {
beforeCompile() {}
}
let strategy = new StaticViewStrategy({
template: '<template><input value.bind="value" /></template>',
template: '<template><input value.bind="value"></template>',
dependencies: [AquaMan, VentureCapital, BabyBoomer, BlitzCrank]
});
strategy
@@ -152,7 +152,7 @@ describe('ViewLocator', () => {
});
}
let strategy = new StaticViewStrategy({
template: '<template><input value.bind="value" /></template>',
template: '<template><input value.bind="value"></template>',
dependencies: () => [AureliaSol, mockEsmImport()]
});
strategy

0 comments on commit 8452a66

Please sign in to comment.