Skip to content

Commit 7036a7e

Browse files
committed
Minor update to the documentation
1 parent 48191fb commit 7036a7e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MEANS.js
22
=============
3-
Type-safe Scala.js Bindings for the MEAN Stack (MongoDB ExpressJS AngularJS NodeJS).
3+
MEANS.js is a Scala.js Facade for the MEAN Stack (MongoDB ExpressJS AngularJS NodeJS).
44

5-
Table of Contents
5+
## Table of Contents
66

77
* <a href="#Introduction">Introduction</a>
88
* <a href="#Development">Development</a>
@@ -21,8 +21,11 @@ Table of Contents
2121
<a name="Introduction"></a>
2222
## Introduction
2323

24-
The goal of MEANS.js is to be complete set of type-safe Scala.js bindings for the entire MEAN Stack + Scala.js.
25-
MEANS.js goes to great lengths to make all the things you love about writing Scala on the MEAN Stack.
24+
The goal of MEANS.js is to be a complete Scala.js facade for the entire MEAN Stack. Why? Because I love NodeJS,
25+
but I have a love/hate relationship with JavaScript. And many others feel the same way about JavaScript, which is why
26+
there are so many languages that are designed to improve the experience (CoffeeScript, TypeScript, Scala.js and others).
27+
Simply put, MEANS.js let's me have my cake and eat it too! And as such, I've gone to great lengths to bring all the
28+
things you love about developing applications on the MEAN Stack to Scala.
2629

2730
<a name="Development"></a>
2831
## Development
@@ -457,8 +460,8 @@ Consider the following example:
457460

458461
```scala
459462
$http.get[js.Dynamic]("/api/tradingClock/status") onComplete {
460-
case Success(obj) => console.log(angular.toJson(obj))
461-
case Failure(e) => ...
463+
case Success(status) => console.log(angular.toJson(status))
464+
case Failure(e) => console.error(e.getMessage)
462465
}
463466
```
464467

@@ -473,10 +476,11 @@ However, sometimes we instead want to retrieve the data as a type-safe Scala obj
473476

474477
```scala
475478
$http.get[MarketStatus]("/api/tradingClock/status") onComplete {
476-
case Success(status) => ...
477-
case Failure(e) => ...
479+
case Success(status) => console.log(angular.toJson(status))
480+
case Failure(e) => console.error(e.getMessage)
478481
}
479482

483+
@js.native
480484
trait MarketStatus extends js.Object {
481485
var stateChanged: Boolean = js.native
482486
var active: Boolean = js.native

0 commit comments

Comments
 (0)