Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jokade authored Dec 4, 2016
1 parent 3d736ca commit 4780137
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ angulate2

[Scala.js](http://www.scala-js.org/) bindings for [Angular 2](http://www.angular.io). The goal is to provide an API/ experience very similar to the [TypeScript API](https://angular.io/docs/ts/latest/guide/cheatsheet.html) of Angular 2.

**WARNING: This is work in progress (alpha status)!**
Most of the features of Angular2 are still missing and the API may change at any time without notice!
**WARNING: This is work in progress!**
Many of the features of Angular2 are still missing and the angulate2 API may still change significantly.

**IMPORTANT: angulate2 now uses the CommonJS module format introduced with Scala.js 0.6.13 instead of global scope.
The entire code basis is currently being refactored to facilitate this.**
Expand All @@ -23,16 +23,12 @@ Getting Started
### SBT Settings
Add the following lines to your `project/plugins.sbt`:
```scala
resolvers += Resolver.sonatypeRepo("snapshots")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")

addSbtPlugin("de.surfice" % "sbt-angulate2" % "0.0.1-SNAPSHOT")
addSbtPlugin("de.surfice" % "sbt-angulate2" % "0.0.1")
```
and this to your `build.sbt`:
```scala
resolvers += Resolver.sonatypeRepo("snapshots")

enablePlugins(Angulate2Plugin)

ngBootstrap := Some("NAME_OF_THE_MODULE_TO_BOOTSTRAP")
Expand Down Expand Up @@ -118,6 +114,29 @@ Then you only need to import the `app` module from within your `index.html` to b
</html>
```
### Create root NgModule and Component
```scala
import angulate2.std._
import angulate2.platformBrowser.BrowserModule

@NgModule(
imports = @@[BrowserModule],
declarations = @@[AppComponent],
bootstrap = @@[AppComponent]
)
class AppModule {

}

@Component(
selector = "my-app",
template = "<h1>Hello Angular!<h1>"
)
class AppComponent {

}
```
License
-------
This code is open source software licensed under the [MIT License](http://opensource.org/licenses/MIT).

0 comments on commit 4780137

Please sign in to comment.