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

Angular 2 "MusicStore" sample still uses old version of Angular #622

Closed
digital-nomad17 opened this issue Jan 29, 2017 · 8 comments
Closed

Comments

@digital-nomad17
Copy link

digital-nomad17 commented Jan 29, 2017

I am learning from the sample project MusicStore for angular 2 and alot of the api's and classes are now deprecated in the stable release. Does anyone want to update them?

I'll take a shot at it when I have time. In the meantime it should be noted.

here are some of the classes and so on that are now deprecated:

  • ngFormModel
  • router.ROUTER_DIRECTIVES
  • Control

EDIT: Here is some of the classes that were deprecated: https://www.picnet.com.au/blogs/guido/post/2016/06/30/upgrading-to-angular-2-reactive-forms-rc3-new-forms/

@tonysneed
Copy link

+1 ... The aspnet-spa generator is still using DNX.

@MarkPieszak
Copy link
Contributor

You want to check out the Templates/Angular2Spa for up to date repos. I can't remember, but the samples are very old, not sure if they're meant to be used (?). Have to ask Steven on that one though.

As for generators you want to npm install -g generator-aspnetcore-spa to get the latest ones.

@tonysneed
Copy link

@MarkPieszak I just installed generator-aspnetcore-spa and the templates are DNX-based. I looked at project.json in the dev branch, and that's up-to-date. But it looks like the npm package has not been published from dev. /cc @SteveSanderson

@SteveSandersonMS
Copy link
Member

@AndrewCarre Yes, you're right - the Angular 2 MusicStore sample is still on 2.0.0-beta.15, which is ancient. If you are interested in updating this, that would be great! Like @MarkPieszak mentions, the up-to-date stuff is in the templates. See the templates/ directory. At some point, if that sample remains badly out-of-date and nobody is ready to update it, we'll most likely just remove it to avoid confusing anyone.

@tonysneed That's not correct. I'm not sure what you're looking at, but generator-aspnetcore-spa produces projects based on the dotnet tooling (and you can choose between project.json (e.g., works with VS2015 or CLI tooling prior to preview3) or .csproj (e.g., works with VS2017 or CLI tooling preview3+) formats. This is completely up-to-date. You might want to check you have the latest generator-aspnetcore-spa installed (current is v0.7.4) and that you're running yo aspnetcore-spa to start it.

@tonysneed
Copy link

@SteveSanderson Yes, my local version is outdated. If I run npm install -g generator-aspnet-spa I get 0.1.3.

npm ls -g generator-aspnet-spa
C:\Users\Tony\AppData\Roaming\npm
`-- [email protected]

I uninstalled, then re-installed, and still got v 0.1.3. Then I ran npm install -g generator-aspnet-spa@latest and still got v 0.1.3. Lastly, I tried npm install -g [email protected] and got:

Cannot read property 'path' of null

Is this just an NPM issue? I'm getting this same behavior on both Windows 10 and Mac OS.

@SteveSandersonMS
Copy link
Member

@tonysneed The package name is generator-aspnetcore-spa, not generator-aspnet-spa.

I've just updated the NPM registry to mark generator-aspnet-spa as deprecated, so you should now get a warning if you try to install it.

@SteveSandersonMS SteveSandersonMS changed the title Project samples are out of date Angular 2 "MusicStore" sample still uses old version of Angular Jan 30, 2017
@tonysneed
Copy link

Ahhh ... that explains it! I figured it had to be something like that. 😊

@SteveSandersonMS
Copy link
Member

This sample has been removed in the latest dev branch because it was ridiculously out-of-date. We probably don't need a newer equivalent to this sample, because the AngularSpa template itself is a more convincing application structure and provides good guidance on its own. It's not desirable to have detailed examples of third-party framework usage in this repo - documentation and samples about that should be maintained by the third-party framework teams themselves.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants