Skip to content

Commit aad84b8

Browse files
author
Simon Touitou
authored
Merge pull request #151 from Lehoczky/master
Adjust whitespace and syntax highlight in code examples
2 parents 2660346 + 0ded221 commit aad84b8

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Import the MobxAngularModule:
4242
import { MobxAngularModule } from 'mobx-angular';
4343

4444
@NgModule({
45-
imports: [..., MobxAngularModule]
45+
imports: [..., MobxAngularModule]
4646
})
4747
export class MyModule {}
4848
```
@@ -56,14 +56,14 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
5656
import { store } from './store/counter';
5757

5858
@Component({
59-
changeDetection: ChangeDetectionStrategy.OnPush,
60-
template: `
59+
changeDetection: ChangeDetectionStrategy.OnPush,
60+
template: `
6161
<div *mobxAutorun>
6262
{{ store.value }} - {{ store.computedValue }}
6363
<button (click)="store.action">Action</button>
6464
</div>
6565
`
66-
})
66+
})
6767
export class AppComponent {
6868
store = store;
6969
}
@@ -101,13 +101,13 @@ Usage:
101101
import { Component, ChangeDetectionStrategy } from '@angular/core';
102102

103103
@Component({
104-
changeDetection: ChangeDetectionStrategy.OnPush,
105-
template: `
104+
changeDetection: ChangeDetectionStrategy.OnPush,
105+
template: `
106106
<div *mobxReaction="getParity.bind(this)">
107107
{{ parity }}
108108
</div>
109109
`
110-
})
110+
})
111111
class AppComponent {
112112
getParity() {
113113
return (this.parity = store.counter % 2 ? 'Odd' : 'Even');
@@ -134,8 +134,8 @@ import { store } from './store/counter';
134134
import { comparer } from 'mobx';
135135

136136
@Component({
137-
changeDetection: ChangeDetectionStrategy.OnPush,
138-
template: `
137+
changeDetection: ChangeDetectionStrategy.OnPush,
138+
template: `
139139
<div *mobxAutorun="{ detach: true, name: 'foo', delay: 3000 }">
140140
{{ store.value }} - {{ store.computedValue }}
141141
<button (click)="store.action">Action</button>
@@ -146,7 +146,7 @@ import { comparer } from 'mobx';
146146
{{ parity }}
147147
</div>
148148
`
149-
})
149+
})
150150
export class AppComponent {
151151
store = store;
152152
comparer = comparer;
@@ -237,9 +237,11 @@ In case you do that - we export a proxy to the decorators from mobx-angular, whi
237237

238238
Check out `projects/todo` for an example of how to use `mobx-remotedev` with Angular:
239239

240+
```
240241
$ npm install mobx-remotedev
241-
242242
```
243+
244+
```ts
243245
// app.module.ts
244246
import remotedev from 'mobx-remotedev';
245247
import { Todos } from './stores/todos.store';

0 commit comments

Comments
 (0)