9 ms·
Version 6 of Angular Now Available
- catchmeifyoucan 8y agoStill no support for deleting components in one go. That would improve the toolchain :(
- AntonyGarand 8y agoVery nice! The ng update command will make updating a lot easier, this has been bugging me with the fast release cycle Angular is using.
- coolspot 8y agoBeware that new @angular/cli@6.0.0 doesn't support universal node packages that are using fs/net/stream depending on the environment (e.g. using fs.readFile() when running in Node, while using window.fetch() when running in a browser.) It seems that Angular team made a decision to not have out-of-the-box support for projects using such packages even in the future [1]. [1] https://github.com/angular/angular-cli/issues/9827#issuecomment-369578814 https://github.com/angular/angular-cli/issues/9827#issuecomm...
- Yuioup 8y agoMakes perfect sense to me.
- coolspot 8y agoIt may sound logical, but unfortunately breaks a lot of existing angular projects and there is no kosher way to configure it to work. For example both Rust’s stdweb and emscripten are detecting node/browser to load wasm file by appropriate method, they will not work in angular 6 project.
- yesimahuman 8y agoThe auto import of providers is my favorite feature in this. Now you can just define something as @Injectable() and make it available in the module automatically. Big improvement over older versions
- akmittal 8y agoI was waiting for ivy renderer which is a big improvement. It was not included in this release.
- STRiDEX 8y agoIts available behind a a flag. angularCompilerOptions.enableIvy This article had more on it https://blog.ninja-squad.com/2018/05/04/what-is-new-angular-6/ https://blog.ninja-squad.com/2018/05/04/what-is-new-angular-...
- rsuelzer 8y agoYay. I thought I was done with work for the day but I'm going to start seeing how this update goes. I doubt I will be allowed to spend much time updating packages during the week.
- megaman22 8y agoWhat is the backwards compatibility and support model for Angular? I just don't have time to chase after things that move this quickly, not and fulfill all my other responsibilities. I'm supporting a mature application that has a front-end started less than eighteen months ago with AngularJS. Maintenance and support on third-party components we use is already starting to dry up. Rewriting things every six months is not reasonable for our team, much as we really ought to stay up to date. I suppose we'll muddle along until things really break down, but this pace of change is not sustainable, particularly when so much of it just seems like churn for churn's sake.
- davidjnelson 8y agoAngular 2 came out in 2016. Why use angular 1 in 2017?
- krzyk 8y agoLegacy project? Migrating from AngularJS to Angular >= 2.x is not that easy if you build a framework arond AngularJS. E.g. in my company we use AngularJS because of that.
- xab9 8y agoYou probably are not aware how many (rather big) projects out there are still on angular 1 with no upgrade plan at all. Last time I turned down a job offer because of a similar scenario.
- BillFranklin 8y agoHi, xab9. Out of interest, why did you turn down a job because they are working with a framework version from 2016?
- xab9 8y agoThis was A1, which came out in 2010. I've spent two years using it, I know its strengths and weaknesses, there are just better offers out there.
- sixdimensional 8y agoHow will WebAssembly play in to Angular in the future?
- IggleSniggle 8y agoFor the most part, they’re not part of the same discussion. TypeScript/JavaScript is still a sensible language and execution environment for interaction driven browser concerns. That said, there are some interesting implied ambitions for Angular. The AngularDart project, the Bezel project, the AngularCompiler more generally as a point of special focus...
- EugeneOZ 8y agoJust in case if somebody didn't read to that part, I want to highlight this amazing tool: https://update.angular.io/ https://update.angular.io/
- antonkm 8y agoWas a firm believer in Angular when it was version 2, made the switch to React before Angular version 4. Best choice I've done for productivity.
- noir_lord 8y agoSame, they handled the transition terribly, I really wanted to use angular but I stuck with knockout and then ended up going to VueJs instead.
- tarellel 8y agoI've gone to using VueJS full-time as well and it's been absolutely amazing at increasing my productivity.
- noir_lord 8y agoWhat I really like with SFC's is that with some thought you get genuinely scoped components meaning you can build your UI much like something like XAML/WPF which for the kind of interfaces I build is fantastic. Combined with QuickType, C# and TypeScript it's productive as hell.
- stupidcar 8y agoI'd offer the opposite perspective: I started a recent app in React, and I wish I'd stuck with Angular. The core of the React render model is beautiful. It's far quicker to start writing and using a new component in React than in Angular, and the functional nature of React components feels good and highly productive. At first. But the problem is, around that beautiful core, the React community has built a mass of libraries, meta-frameworks, techniques and practices that are decidedly less beautiful. After a while, I really found myself missing features from Angular, and struggling to replicate them by wiring together a hodge-podge React++ framework. Instead of being productive, I was wasting an inordinate amount of time trying to discover what the current micro-framework de-jour was for handling a particular problem in React. For example, Angular supports view encapsulation. So you can write CSS targeting a component, and the framework will ensure that the style rules you write apply only to the HTML rendered by that components, without leaking to other parts of the app. This really is a godsend for properly isolating components in a reusable way. With React, there's a myriad of libraries for doing CSS, but most seem to be abandoned, and none seem to offer as straightforward or as easy style encapsulation as what Angular provides out of the box. It was a similar story with forms. Which are a rich, reactive API in Angular, but seem to be an afterthought in React. And with dependency injection, both of singleton services and components elsewhere in the hierarchy. I expect if you go all in on Redux, you can eventually build up a reasonable facsimile of what Angular provides. But from a standing start I think Angular is a much more productive framework, just because it's actually trying to be a framework, whereas React seems to be stuck somewhere between being a UI library and a framework, leaving the community to somewhat badly fill in the gaps.
- knowThySelfx 8y agoProbably good for starting new projects. The ecosystem looks clean with separation of concerns. Not worth the pain migrating old projects to Angular 2/3/4/5/6/n, unless you have the resources to do so.
- throwme_1980 8y agoLol @ js front end, people burning time rewriting and chasing libraries. The tooling is hilarious
- bob1029 8y agoSigh. Yet more confirmation that my team has made the correct choice in switching to a mostly vanilla JS development stack (we still use RiotJS for one-way template binding). I was there for the beginning of Angular and it got me hooked on single page applications, but what I am seeing now is the antithesis of productivity. No one building a website for a business should be using this stuff, unless they drank so much frontend framework kool-aid that they cant find their car keys without an NPM command anymore. I don't care how many internal projects at google use this framework. Our business doesn't have billions of dollars to incinerate on attempts to prove a point. The means of successfully executing SPA and managing your UX state are not intrinsically linked with using someone's subjective interpretation of how it should go (aka a frontend framework). Treat the browser and the DOM like an actual canvas and stop looking through the perspectives of others to see it. Focus on what you want to build, not the tools you use to build it. The fact that there are literally hundreds of angular-style frontend frameworks with wildly different approaches should be a warning sign to developers looking for a consistent basis upon which to build shit.
- dbbk 8y ago> Focus on what you want to build, not the tools you use to build it. This is an interesting comment to me because, by essentially building your own framework, that onus is now completely on you. If you want to implement code splitting or tree shaking or whatever, you have to figure that out for yourself. That's time taken away from building product features. Whereas other frameworks can offer this out of the box because smart people in the open source community have figured that all out for you. In addition, no one coming into your organisation has any continuity of knowledge, so they have to learn all the proprietary ways your app is set up, which is more time lost.
- lucidone 8y agoIn addition to your in addition, the experience gained learning and using a proprietary framework isn't "resume-able" in the same way putting React or Angular is. That could mean a significant difference in salary, and it's also why I'm shopping around for new work right now. Like it or not, it matters.
- alceta 8y agoI was joyfully expecting this upgrade and checked the release notes daily during the RC phase. Don't let the quick 'major' version changes shock you, upgrading 4 -> 5 was easy and I expect the same for this upgrade. A big thanks to everyone involved in shaping this release and ensuring the upgradability for the past major versions, including the huge effort in making it possible to continuously migrate from AngularJS. <3 If you care for the details behind my experiences: We have begun migrating a ~80k loc AngularJS codebase first to TypeScript in 2016, which was the preparation for the Angular upgrade starting Q1 this year. Now we are roughly 80% migrated to Angular 5 (in the meantime we did the upgrade from 4 to 5 in a few hours thanks to https://update.angular.io/ https://update.angular.io/), the rest running with ui-router hybrid [1] and ngUpgrade [2] and now are looking forward to moving the rest to Angular and upgrading to 6.0. Coming from AngularJS where many things are done without a proper reason, I have started to embrace and even somewhat love Angular for the niceties it brings it. When you already embraced TypeScript, it is a breeze to work with and I cannot recommend it enough (for large-scale frontends this is). The one pitfall I always ended up with during the migration was that AngularJS attribute directives cannot be converted to Angular and then downgraded (In the hybrid app, the entry component is always(?) AngularJS and up from there), which is a large part of the remaining AngularJS code. There are a few workarounds but they did not seem to work properly. If anyone has suggestions on that part. [1] https://github.com/ui-router/angular-hybrid https://github.com/ui-router/angular-hybrid [2] https://angular.io/guide/upgrade https://angular.io/guide/upgrade
- dbbk 8y agoOut of interest, have you looked into EmberJS? That has by far the smoothest upgrade process I've come across. One CLI command upgrades your dependencies, does a diff against a new greenfield project and applies the changes to your application, and also runs any codemods to migrate your code to a new pattern.
- alceta 8y agoI did not look into it mainly because we cannot afford a rewrite, and the ngUpgrade module provided us with a way to write new code without replacing everything in one go (and breaking the entire frontend in between).
- InTheArena 8y agoThis upgrade looks absolutely fantastic. The Elements piece in particular looks amazing, and has the potential to be a real game changer for shops that have a diverse set of applications that they use, and need large scale re-use of components. At the mid-size corporation that I work at, we just standardized all Javascript development on Angular from a mismash of a ton of technologies. Angular seems very well suited for this role. There was a interesting statistic recently that showed that Angular was dominating "east coast" applications (traditional financial services, pharma, insurance, manufacturing, established CS) while React was most popular in "west coast" applications - primarily silicon valley, etc. I'm glad these two technologies are here to push each other.
- zygimantasdev 8y ago>At the mid-size corporation that I work at, we just standardized all Javascript development on Angular from a mismash of a ton of technologies. Angular seems very well suited for this role. In my experience centralisation and fixation on specific technology leads to stagnation quickly. IMO you should allow teams to choose their own tools. How else will you improve?
- lopatin 8y agoTo quote one of Akin's laws which were on HN yesterday, "better is the enemy of good". It's really good when one technology is used throughout an organization to achieve the same purpose. At some point, the technology you use is actually good enough, and incremental improvements to "keep up with the times" are simply distractions from the real work. And if at some point you find that your tech has truly stagnated, at least you're stagnated together, and can modernize together at the same time.
- zygimantasdev 8y agoThe problem is how will you find that your tech has stagnated? If nobody experiments with new tech - who will teach others? How will that knowledge come into your corp? Hiring new people to do that will not work, because: - People being hired will be evaluated by legacy people (different thinking will be considered disadvantage during interviews) - Legacy people will not listen to new hires since they have no credibility and it "has been the way it was always done"
- ufmace 8y agoI came in here to try and get a feel for what front-end developers these days think of the new Angular vs React. I don't have any stake in this game, since I'm not currently working on anything front-end. I'm pleasantly surprised to see that, instead of the half-expected Angular bash-fest, there seems to be a number of people praising Angular over the React ecosystem. When I last did front-end, I was using Angular 1.x, and despite some warts, I did like the overall architecture of it, and how it provided all of the important components for you and gave you an overall app organization. It felt like quite a change to try and build an app with React and experience the world of having to pick and glue together a bunch of components with ever-evolving build systems. This makes me more interested in trying to build something in the new Angular.
- ausjke 8y agoIgnoring Angular since the start, this headline and comments made it like I need check this out again, but, Angluar2+ seems like in decline in trend(comparing to React and even Vue), is this not true all of a sudden now?
- pepijndevos 8y agoIn case anyone else has not been following Angular very closely, apparently AngularJS is version one, based on JavaScript, while Angular refers to version 2 and higher, which use Typescript. A major difference seems to be that Angular is more geared towards one-way binding. Two-way binding was from what I gather a common complaint from the React side, saying it's slow and leads to complex and unexpected behavior.
- vonseel 8y ago6? Weren’t we just talking about the major upgrade to Angular 2.0 less than two or three years ago?