Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(tutorial): Code samples use deprecated $http promise methods #12755

Closed
rabdill opened this issue Sep 4, 2015 · 1 comment
Closed

docs(tutorial): Code samples use deprecated $http promise methods #12755

rabdill opened this issue Sep 4, 2015 · 1 comment

Comments

@rabdill
Copy link

rabdill commented Sep 4, 2015

The tutorial (website, repo) looks like it might be due for at least a few minor changes. In particular, starting in step 5, it sets up a call using the $http service like this:

phonecatApp.controller('PhoneListCtrl', function ($scope, $http) {
  $http.get('phones/phones.json').success(function(data) {
    $scope.phones = data;
  });

  $scope.orderProp = 'age';
});

When, according to the most recent docs, we aren't supposed to do that anymore. I'd be happy to move everything into using the .then() method, but this would also require fixing the angular-phonecat repo that's used in the tutorial, and I'm not sure if there's a particular process in place for coordinating changes so they line up properly. (Also, to be honest, I have no idea how you've been dealing with pushing changes through all the phonecat "releases" retroactively without someone dying in a rebasing accident.)

@Narretz Narretz added this to the 1.4.x milestone Sep 9, 2015
gkalpak added a commit to gkalpak/angular.js that referenced this issue Apr 12, 2016
This is a major re-structuring of the tutorial app's codebase, aiming at applying established best
practices (in terms of file naming/layout and code organization) and utilizing several new features
and enhancements (most notably components) introduced in recent versions of Angular (especially
v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#13834.
Again, mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch of
[angular-phonecat](https://github.com/angular/angular-phonecat). The `v1.4.x` version of the
tutorial should be pointed to that branch instead of `master`.

--
Related to angular/angular-phonecat#326.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes angular#12755
Fixes angular#13312
Fixes angular#13623
Fixes angular#13632

Closes angular#8952
Closes angular#11726
Closes angular#12946
Closes angular#12947
Closes angular#13198
Closes angular#13284
Closes angular#13834
Closes angular#14178
Closes angular#14223
gkalpak added a commit to gkalpak/angular.js that referenced this issue May 24, 2016
This is a major re-structuring of the tutorial app's codebase, aiming at applying established best
practices (in terms of file naming/layout and code organization) and utilizing several new features
and enhancements (most notably components) introduced in recent versions of Angular (especially
v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#13834.
Again, mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch of
[angular-phonecat](https://github.com/angular/angular-phonecat). The `v1.4.x` version of the
tutorial should be pointed to that branch instead of `master`.

--
Related to angular/angular-phonecat#326.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes angular#12755
Fixes angular#13312
Fixes angular#13623
Fixes angular#13632

Closes angular#8952
Closes angular#11726
Closes angular#12946
Closes angular#12947
Closes angular#13198
Closes angular#13284
Closes angular#13834
Closes angular#14178
Closes angular#14223
@gkalpak
Copy link
Member

gkalpak commented May 25, 2016

Closed with c2033d7.

@gkalpak gkalpak closed this as completed May 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants