Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore(dart): updating to beta.16 #1192

Closed
wants to merge 1 commit into from

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Apr 26, 2016

Updated docs and samples to beta.16.

For this first time, among other things, I payed particular attention to the changes that were made on the ts side of things (#1178). Since I wrote it up in my notes, here is the check list of ts updates with notes about how there might be corresponding changes on the Dart side:

  • public/docs/_examples/cb-dependency-injection/ts/app/main.ts
  • public/docs/_examples/cb-ts-to-js/ts/app/main.ts
    • cb not in Dart docs yet.
  • public/docs/_examples/dependency-injection/ts/app/car/car-injector.ts
  • public/docs/_examples/dependency-injection/ts/app/injector.component.ts
    • Updated Dart example code to avoid null argument.
  • public/docs/_examples/homepage-hello-world/ts/index.1.html
  • public/docs/_examples/homepage-tabs/ts/index.1.html
  • public/docs/_examples/homepage-todo/ts/index.1.html
  • public/docs/_examples/package.json
    • N/A for Dart.
  • public/docs/_examples/pipes/ts/app/app.component.html
  • public/docs/_examples/pipes/ts/app/app.component.ts
  • public/docs/_examples/pipes/ts/app/exponential-strength.pipe.ts
  • public/docs/_examples/pipes/ts/app/fetch-json.pipe.ts
  • public/docs/_examples/pipes/ts/app/random-pipe.component.ts
  • public/docs/_examples/quickstart/js/package.1.json
  • public/docs/_examples/quickstart/ts/package.1.json
  • public/docs/_examples/router/ts/app/main.2.ts
  • public/docs/_examples/testing/ts/app/mock-router.ts
    • N/A for Dart.
  • public/docs/js/latest/_data.json
  • public/docs/ts/latest/_data.json
    • Dart equivalent updated.
  • public/docs/ts/latest/guide/dependency-injection.jade
    • No need to update since it imports the TS version.
  • public/docs/ts/latest/guide/pipes.jade
    • Not in Dart prose yet.
  • tools/plunker-builder/indexHtmlTranslator.js
    • N/A for Dart.

Updated docs and samples to beta.16.

For this first time, among other things, I payed particular attention
to the changes that were made on the `ts` side of things
(angular#1178). Since I wrote it up
in my notes, here is the check list of `ts` updates with notes about
how there might be corresponding changes on the Dart side:

- public/docs/_examples/cb-dependency-injection/ts/app/main.ts
- public/docs/_examples/cb-ts-to-js/ts/app/main.ts
  - cb not in Dart docs yet.
- public/docs/_examples/dependency-injection/ts/app/car/car-injector.ts
-
public/docs/_examples/dependency-injection/ts/app/injector.component.ts
  - Updated Dart example code to avoid null argument.
- public/docs/_examples/homepage-hello-world/ts/index.1.html
- public/docs/_examples/homepage-tabs/ts/index.1.html
- public/docs/_examples/homepage-todo/ts/index.1.html
- public/docs/_examples/package.json
  - N/A for Dart.
- public/docs/_examples/pipes/ts/app/app.component.html
- public/docs/_examples/pipes/ts/app/app.component.ts
- public/docs/_examples/pipes/ts/app/exponential-strength.pipe.ts
- public/docs/_examples/pipes/ts/app/fetch-json.pipe.ts
- public/docs/_examples/pipes/ts/app/random-pipe.component.ts
  - Dart version of sample code is incomplete, but did run in beta.15.
  - Example no longer runs, see
angular/angular#8258
- public/docs/_examples/quickstart/js/package.1.json
- public/docs/_examples/quickstart/ts/package.1.json
- public/docs/_examples/router/ts/app/main.2.ts
- public/docs/_examples/testing/ts/app/mock-router.ts
  - N/A for Dart.
- public/docs/js/latest/_data.json
- public/docs/ts/latest/_data.json
  - Dart equivalent updated.
- public/docs/ts/latest/guide/dependency-injection.jade
  - No need to update since it imports the TS version.
- public/docs/ts/latest/guide/pipes.jade
  - Not in Dart prose yet.
- tools/plunker-builder/indexHtmlTranslator.js
  - N/A for Dart.
@chalin
Copy link
Contributor Author

chalin commented Apr 26, 2016

@thso, this is ready for your review.

@chalin chalin changed the title chore(dart): updating to beta.16 [awaiting review] chore(dart): updating to beta.16 Apr 26, 2016
@Pipe(name: 'exponentialStrength')
@Injectable()
@Injectable() // FIXME(chalin): unnecessary?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HeroService doesn't have any dependencies at the moment. Add the decorator anyway. It is a "best practice" to apply the @Injectable() decorator ​from the start​ both for consistency and for future-proofing.

From https://angular.io/docs/ts/latest/tutorial/toh-pt4.html

Event though it's not necessary, per style guide it should be added to all classes that are supposed to be injected.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw. It's a Pipe. @Pipe like @Component() and @Directive() don't need an additional @Injectable()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I thought, but I wanted to double check in case there was a nonstandard case where it might have been necessary. Thanks for confirming. @thso do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All core pipes have the @Injectable() annotation: https://github.com/angular/angular/blob/master/modules/angular2/src/common/pipes/lowercase_pipe.ts

But I'm not convinced either that it's effectively required. Just try and build your app and see if everything still work without it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will be glad to try that out once angular/angular#8258 is fixed :). What do you suggest in the meantime? As I pointed out elsewhere, this example will need to be fully revised soon.

@thso
Copy link
Contributor

thso commented Apr 27, 2016

Only minor things.

@chalin chalin changed the title [awaiting review] chore(dart): updating to beta.16 chore(dart): updating to beta.16 Apr 27, 2016
@chalin
Copy link
Contributor Author

chalin commented Apr 27, 2016

@thso: given the comments above (example no longer works and needs follow-up revision), is this good to merge? If so, can you merge it?

@wardbell wardbell closed this in 0557c72 Apr 28, 2016
@chalin chalin deleted the chalin4dart-beta-16 branch April 28, 2016 23:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants