Update to Angular 4.0.0
Angular 4.0.0 has now been released http://angularjs.blogspot.com.au/2017/03/angular-400-now-available.html with some good improvements
Still a few things to work out in the integration, but here's what I have so far with .NET and Angular 4. I've started work in this repo (https://github.com/MarkPieszak/aspnetcore-angular2-universal) for now, but imagine it'll get into here soon enough
Wow! Thanks @MarkPieszak Wrongly assumed it was essentially a package update, with v2 to v4 meant to be basically non breaking
Yeah it's quite a bit more, also starting the process differently (now in the Controller) so that we can give .NET the other essential SEO data.
Of course, if you don't care about server rendering, you can just shut it off and update to 4.0 real easily :)
Fantastic! Just had to change the port number in fetchdata.components.ts from http://localhost:5000/api/test/users to http://localhost:1780/api/test/users to get the fetch-data sample working.
Yes so that eventually that'll be set dynamically from the server wth DI, going into Angular, just one of the improvements needed! URLs must be absolute on the server, previously we patched them for you in Universal.
After upgrading to Ang4 i get this error hile runnign webpack on webpack.config file:
ERROR in [at-loader] ./node_modules/angular2-universal/node_modules/angular2-platform-node/node-platform.d.ts:1:10
TS2305: Module '"C:/Projects/EYC/Solutions/Anticipate/src/Eyc.Solutions.Anticipate.Ui.Web.2/node_modules/@angular/platform-browser/platform-browser"' has no exported member 'AnimationDriver'.
Any idea? Than kyou.
You actually can't just update the current project here to Angular4 my apologies. It takes re shifting and removing a lot a lot of things, pull down that branch I pointed to @skorunka and try to port your app to it.
Honestly though I'd suggest waiting a little bit until it's more cleaned up!
@MarkPieszak No worries, I understand. Thank you for advice, i will give it a try.
AOT
@starquake , sorry. AOT = ahead-of-time https://angular.cn/docs/ts/latest/guide/glossary.html We all expect officially asp net core angular upgrade to 4.0!
@seven1986 I'm sorry, what does 'AOT' mean?
@MarkPieszak Will you let us know here when you've done?
@MarkPieszak For angular 4 branch you pointed is still using es6-shim. Is there any plan to update it to core-js?
Sure, I'll ping everyone when it's all finished. @bm-software Yes there's a lot that needs to be updated along with core-js, such as AoT etc.
For now that branch is bare bones but sometime in the next few days I'm hoping I can find a good bunch of hours where I can focus on it and get it into Masters with everyone fixed up in it.
@MarkPieszak You are our hero!
@starquake , Ahead of time compilation. I'm a noob, but essentially precompiling the entire angular app before even hosting on a server. It increases performance since the angular compiler no longer needs to render the templates. It also offers a feature called tree-shaking that reduces the size of bundles since the UI is rendered during compilation and things not used are not included.
@MarkPieszak do you plan to include angular-cli into the template? If so, are you going to use AoT and other functionality from angular-cli? I'm asking because angular2 template had some custom functionality which is now supported by official angular-cli
The problem is that because we are trying to do server side pre-rendering, this breaks away from the use-case of the CLI. The CLI is helpful if you just want a normal client side application and your Rest API is a separate all together entity. Here, the goal is to unify them and .NET be aware of the application as well as aid in serializing it to a string (thus giving us the Prerender ability, since that's only available through Node, and Steve created an incredibly easy way to invoke node within .net core)
AoT will definitely be a part of the template as well, I haven't talked with @SteveSandersonMS yet about the plans for having it here as well, but once I clean a few things up i could make a PR to include it Steve?
At the end of the day the only thing we'll be missing compared to the CLI is the generators, but you could write those in just about any scripting language, even something as easy as Gulp if you wanted to write one.
I'm trying to rapidly update my vs2015 project to use it with vs2017 but I'm getting the following errors:

Is there a quick fix for that? The project structure is the default one with ClientApp folder inside the project root folder
For me actually the most missing feature in JSS is ability to use generators. It's possible to quickly create some custom generators but they will need to be updated to reflect changes in cli, etc. So if it's possible to reuse at least generators parts that would be great even if we will miss such things like 'ng serve'.
Any updates ?