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

Global import of rxjs lib #2620

Closed
wants to merge 1 commit into from
Closed

Global import of rxjs lib #2620

wants to merge 1 commit into from

Conversation

maartentibau
Copy link

Avoid the global import of the whole rxjs lib, when we only need the Observable and keep it consistent throughout the whole tutorial

Avoid the global import of the whole rxjs lib, when we only need the Observable and keep it consistent throughout the whole tutorial
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@maartentibau
Copy link
Author

I signed it! :-)

2016-10-17 9:35 GMT+02:00 googlebot notifications@github.com:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll

verify. Thanks.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2620 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD6eTEhYoLUBl05w1Ye6-_iCjbMX7kHWks5q0yUkgaJpZM4KYUGs
.

Met vriendelijke groeten,
Maarten Tibau

  • Zaakvoerder*

M: +32 (0)473 95.04.16
E: maarten@webtrix.be
W: www.webtrix.be

Webtrix | Online maatwerk, onze specialiteit!

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@wardbell
Copy link
Contributor

While we agree in principle, we have been on the fence about this for the tutorial.

We can't just change the code. We'd have to change the prose at the same time. We'd be more interested in this PR if you updated with revised guidance.

@e-hein
Copy link

e-hein commented Jan 4, 2017

Just got a problem because import { Observable } from 'rxjs' does not import the whole rxjs. When I try to run that sample I get an error that the .map operator is not imported. So I had to add the operator import (import 'rxjs/add/operator/map) to get the sample running. Try yourself on http://plnkr.co/edit/xfWEa7Q3DvsE98Ot98Gj?p=preview .
Other samples use partial imports, also. So I'd propose to change this to

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';

wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Jan 5, 2017
@wardbell
Copy link
Contributor

wardbell commented Jan 5, 2017

@Webtrix My apologies. Upon further review, the original line was always wrong and your fix was correct. Should have been import { Observable } from 'rxjs/Observable';

@e-hein The import of the map operator shouldn't have been necessary because of the rxjs-extensions.

However, we're not going to promote the rxjs-extensions approach in this tutorial. Revising to oblige you to import what you need for each file.

See follow up PR #3075, which closes this one.

@wardbell wardbell closed this Jan 5, 2017
wardbell added a commit that referenced this pull request Jan 5, 2017
abdel-ships-it pushed a commit to abdel-ships-it/angular.io that referenced this pull request Feb 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants