Skip to content

Commit

Permalink
Upgrade aot docs (#190)
Browse files Browse the repository at this point in the history
* docs(api/upgrade): add docs about AOT upgrade function helpers

* docs(api/recipes/upgrade): add docs how to upgrade with new upgrade/static function helpers

* docs(README): point to new v4 plunker and update rxjs version

Closes #176
  • Loading branch information
Hotell authored Dec 24, 2016
1 parent d0c0e5d commit 53d77d7
Show file tree
Hide file tree
Showing 9 changed files with 935 additions and 47 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ngMetadata channel or [StackOverflow][stackoverflow] or just ping us on [twitter
## <a name="issue"></a> Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request
with a fix. We would appreciate if you provide a [Plunker][plunker-3.x] with simulated bug that you've found
with a fix. We would appreciate if you provide a [Plunker][plunker-4.x] with simulated bug that you've found


**Please see the Submission Guidelines below**.
Expand Down Expand Up @@ -67,7 +67,7 @@ chances of your issue being dealt with quickly:
* **Motivation for or Use Case** - explain why this is a bug for you
* **Angular/ngMetadata/Typescript Version(s)** - is it a regression?
* **Browsers and Operating System** - is this a problem with all browsers or only IE8?
* **Reproduce the Error** - provide a live example (using [Plunker][plunker-3.x] or an unambiguous set of steps.
* **Reproduce the Error** - provide a live example (using [Plunker][plunker-4.x] or an unambiguous set of steps.
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)
Expand Down Expand Up @@ -250,4 +250,5 @@ You can find out more detailed information about contributing in the
[plunker-1.x]: https://plnkr.co/edit/s2lYnI
[plunker-2.x]: https://plnkr.co/edit/7Fr7oO
[plunker-3.x]: https://plnkr.co/edit/Bds0Bk
[plunker-4.x]: https://plnkr.co/edit/hsz8KF
24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Behind the scenes it uses ES.next decorators extended by TypeScript (which adds
## Quick start

- [Plunkr][plunker-3.x] - try it out in your browser
- [Plunkr][plunker-4.x] - try it out in your browser
- [Playground][playground] - live docs examples and mandatory TODO app example
- [Production ready starter kit][ngParty-Angular-1-scaffold] - Starter Kit ready for production by ngParty team powered by Webpack

Expand Down Expand Up @@ -218,7 +218,7 @@ ng-metadata requires certain polyfills in the application environment. We instal

Install peer dependencies by running:

`npm i --save [email protected].0-rc.1`
`npm i --save [email protected]`

**rxjs** - a polyfill for the Observables specification currently before the TC39 committee that determines standards for the JavaScript language. Developers should be able to pick a preferred version of rxjs (within a compatible version range) without waiting for ng-metadata updates.

Expand Down Expand Up @@ -271,7 +271,8 @@ We typically add a TypeScript configuration file (`tsconfig.json`) to our projec

#### TypeScript Declaration Files

Many JavaScript libraries such as jQuery, the Jasmine testing library, and Angular itself, extend the JavaScript environment with features and syntax that the TypeScript compiler doesn't recognize natively. When the compiler doesn't recognize something, it throws an error.
Many JavaScript libraries such as jQuery, the Jasmine testing library, and Angular itself, extend the JavaScript environment with features and syntax that the TypeScript compiler doesn't recognize natively.
When the compiler doesn't recognize something, it throws an error.

We use TypeScript type declaration files — *d.ts files* — to tell the compiler about the libraries we load.

Expand All @@ -298,21 +299,7 @@ That's it! You are good to go!

## Why?

There is already an existing project, which gives us Angular 2 like syntax for Angular 1, [ng-forward](https://github.com/ngUpgraders/ng-forward)

While I respect all the hard work of the `ng-forward` team, there were things that I didn't like about their solution.

Anyway that project (ngForward) is unmaintained with old/wrong angular 2 API's and isn't production ready at all.

- it tries to mirror angular 2 with lots of under the hood abstractions which is just not feasible because there are major differences, how things work in ng1 an ng2
- it tries to do a lot unnecessary work, which was never finished ( support ES5/ES6 like angular 2 does )
- doesn't provides angular 2 like DI via constructor parameters because `babel` just won't support parameter decorators
- forces you to rewrite templates, so you can't be just 100% sure that your code will work as before

> although we started a discussion about [collaboration](https://github.com/ngUpgraders/ng-forward/issues/138) I just don't think after further analysis, that we can merge
our project one way or another.'

so those are just few reasons why I made **ng-metadata**.
those are just few reasons why I made **ng-metadata**.

**ng-metadata:**
- can be used as part of an upgrade strategy, which may also include *ng-upgrade*, when migrating to Angular 2
Expand Down Expand Up @@ -342,5 +329,6 @@ if you aren't a member just join us [ngParty slack](https://ngparty.herokuapp.co
[plunker-1.x]: https://plnkr.co/edit/s2lYnI
[plunker-2.x]: https://plnkr.co/edit/7Fr7oO
[plunker-3.x]: https://plnkr.co/edit/Bds0Bk
[plunker-4.x]: https://plnkr.co/edit/hsz8KF
[playground]: https://github.com/ngParty/ng-metadata/tree/master/playground
[ngParty-Angular-1-scaffold]: https://github.com/ngParty/Angular1-scaffold
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* [Class](/docs/api/router-deprecated/class.md)
* [Interface](/docs/api/router-deprecated/interface.md)
* [ng-metadata/upgrade](/docs/api/upgrade/README.md)
* [Function](/docs/api/upgrade/function.md)
* [Class](/docs/api/upgrade/class.md)
* [angular 1 specific api](/docs/api/ng-1-misc/README.md)
4. [Contributing](/CONTRIBUTING.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/api/upgrade/class.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Class
# Class ( Deprecated - use [upgrade/static](/docs/recipes/function.md))

- [NgMetadataUpgradeAdapter](#NgMetadataUpgradeAdapter)

Expand Down
Loading

0 comments on commit 53d77d7

Please sign in to comment.