Skip to content

Commit c3b5d00

Browse files
authored
Merge pull request #42 from rmariuzzo/patch-1
Syntax highlighting added.
2 parents a139c41 + 2c8cffe commit c3b5d00

1 file changed

Lines changed: 29 additions & 19 deletions

File tree

README.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,28 @@ Whether you build the component, copy the raw source or use bower (see below),
3939
the end result should be included in your page and the module `sf.virtualScroll`
4040
included as a dependency:
4141

42-
angular.module('myModule', ['sf.virtualScroll']);
42+
```js
43+
angular.module('myModule', ['sf.virtualScroll']);
44+
```
4345

4446
Then use the directive `sf-virtual-repeat` just as you would use `ng-repeat`.
4547

46-
<div class="viewport">
47-
<div>
48-
<table>
49-
<tbody>
50-
<tr sf-virtual-repeat="line in book.lines"><th>{{$index}}: <td>{{line}}
51-
</table>
52-
</div>
53-
</div>
54-
55-
<div class="viewport real">
56-
<ul>
57-
<li ng-repeat="thing in simpleList">{{thing}}</li>
58-
</ul>
59-
</div>
48+
```html
49+
<div class="viewport">
50+
<div>
51+
<table>
52+
<tbody>
53+
<tr sf-virtual-repeat="line in book.lines"><th>{{$index}}: <td>{{line}}
54+
</table>
55+
</div>
56+
</div>
57+
58+
<div class="viewport real">
59+
<ul>
60+
<li ng-repeat="thing in simpleList">{{thing}}</li>
61+
</ul>
62+
</div>
63+
```
6064

6165
If you want to expose the scroll postion (to simulate an `atEnd` event for
6266
example), use `ng-model` and you have access to the scroll properties.
@@ -96,12 +100,16 @@ grunt has 2 parts: the heavy lifting package `grunt` and the shell command
96100
`grunt-cli`. If you haven't already installed `grunt-cli` globally, do so now
97101
with:
98102

99-
sudo npm install -g grunt-cli
103+
```shell
104+
sudo npm install -g grunt-cli
105+
```
100106

101107
To run the simple demo, install the npm dependencies for the build tools and go:
102108

103-
npm install
104-
grunt demo
109+
```shell
110+
npm install
111+
grunt demo
112+
```
105113

106114
You can now view the demo at http://localhost:8000/
107115

@@ -115,7 +123,9 @@ repo containing just the built artifacts here:
115123
[angular-virtual-scroll-bower](https://github.com/stackfull/angular-virtual-scroll-bower).
116124
You can add the component to your project with:
117125

118-
bower install angular-virtual-scroll
126+
```shell
127+
bower install angular-virtual-scroll
128+
```
119129

120130
Or by adding a line to your `component.json` file.
121131

0 commit comments

Comments
 (0)