Merge pull request #125 from jeffbcross/fixes-one

First round of guide content fixes
This commit is contained in:
Alex Wolfe 2015-05-19 13:46:00 -07:00
commit 4a4a8d6e11
2 changed files with 10 additions and 14 deletions

View File

@ -40,28 +40,26 @@
p To see this working, create another file, <code>show-properties.ts</code>, and add the following:
code-tabs
code-pane(language="javascript" name="TypeScript" format="linenums" escape="html").
code-pane(language="javascript" name="TypeScript" format="linenums").
// TypeScript
import {Component, View, bootstrap, For} from 'angular2/angular2';
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({
selector: 'display'
})
@View({
template: `
&lt;p&gt;My name: {{ myName }}&lt;/p&gt
`,
directives: [For]
&lt;p&gt;My name: {{ myName }}&lt;/p&gt;
`
})
class DisplayComponent {
myName: string;
names: Array&lt;string&gt;;
constructor() {
this.myName = "Alice";
}
}
code-pane(language="javascript" name="ES5" format="linenums" escape="html").
code-pane(language="javascript" name="ES5" format="linenums").
// ES5
function DisplayComponent() {
this.myName = "Alice";
@ -72,8 +70,7 @@
}),
new angular.ViewAnnotation({
template:
'&lt;p&gt;My name: {{ myName }}&lt;/p&gt;',
directives: [angular.For, angular.If]
'&lt;p&gt;My name: {{ myName }}&lt;/p&gt;'
})
];
@ -106,12 +103,12 @@
While you've used <code>template:</code> to specify an inline view, for larger templates you'd
want to move them to a separate file and load them with <code>templateUrl:</code> instead.
p So you can see Angular dynamically update content, add a line after
p To see Angular dynamically update content, add a line after
code-example(language="html" escape="html").
<p>My name: {{ myName }}</p>
p to this:
p add this:
pre.prettyprint.lang-html
code.
&lt;p&gt;Current time: {{ time }}&lt;/p&gt;

View File

@ -44,7 +44,6 @@
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;
&lt;script src=&quot;https://jspm.io/system@0.16.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
@ -143,8 +142,8 @@
p.
The root component's job is to give a location in the <code>index.html</code> file where your application will
render through it's element, in this case <code>&lt;my-app&gt;</code>. There is also nothing special about this
element name and you can pick it as you like.
render through its element, in this case <code>&lt;my-app&gt;</code>. There is also nothing special about this
element name; you can pick it as you like.
p.
The root component loads the initial template for the application that will load other components to perform