10 ms·
I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2)
by EugeneOZ 10y ago
I use Angular 2 in production since November 19, 2015 (alpha.46). Currently I've built 3 web apps (40, 60 and 20 components each), 3 mobile apps (with Ionic 2) and my employer have plans for more apps.
Breaking changes during alpha stage were expected, so I didn't have issues with it.
Most positive things I want to highlight:
1. Components are encapsulated and truly reusable (and without dependencies hell).
2. You don't need any "bridges" anymore to use 3-rd party JS libraries inside your Angular app. Nothing need to be "angularized" - twbs, D3, all just works out of the box. Maybe it's even most important part for me.
3. Idea of `(events)` and `[attributes]` is awesome, works really effective and makes code much more easy to read.
4. Performance is great.
5. Community is friendly and have a lot of fun and patience, even to newbies.
6. TypeScript gives a lot of bonuses with zero price - you don't need to learn anything (you can just rename js to ts and it will work) and additions to JS are simple and powerful.
7. Cool abilities like AOT-compilation, server-side rendering and tree-shaking.
Congrats to the all devs who are using Angular, congrats to the Angular team! :)
- dfsegoat 10y agoWhat about angular CLI - ? have you found that useful in your workflow?
- pramttl 10y agoI have found Angular CLI productive, because it helps quickly generate components (each component has an html, ts, css, and spec.ts file with some boilerplate code). It is fairly quick to get up and running with angular-cli as compared to writing a webpack configuration file. However, since angular-cli is in beta, it lacks the flexibility that using webpack directly would offer. (P.S: Angular-CLI latest release would be using webpack internally)
- ausjke 10y agotheir tutorial is still based on systemjs instead of webpack, not sure which loader ng2 is preferring, I hope it's the latter.
- EugeneOZ 10y agoI'm waiting when they implement some more flexible (configurable) tool, and meanwhile I use angular2-seed.
- NhanH 10y agoAny chance you can do a quick cons review too? Specifically comparing to the weakness of Angular 1 like bloated complexities, issue with custom directives or scope life-cycle.
- xeromal 10y agoObtuse error logging is my biggest problem. A lot of the times you have no idea what's going wrong.
- mattmanser 10y agoThat's a general javascript problem though as soon as you involve any third party library. Something funky going wrong when jQuery's involved? Good luck stepping through that.
- ehfeng 10y agoMay want to give Sentry a try for error logging: sentry.io/for/angular2 Let us know if there's anything we can be doing better :)
- xeromal 10y agoThat's pretty slick. Thanks for sharing.
- Bahamut 10y agoRight now, some of the Angular 2 error messages are cryptic - I find it very difficult to figure out what goes wrong in tests currently with Angular 2, the only utility of some of the error messages end up being that there is an error in Angular's compilation of a component (for example).
- ht85 10y agoThis is the reason why I've been separating recent projects into two webpack bundles. I put all libraries into a common bundle, which I blackbox in the browser debugger. This way only frames from my own code show up in the stack by default, and the debugger won't step into library code. This also makes stack traces very easy to visually parse, as you can pretty much ignore all the ones ending in "... (common.js)".
- paradite 10y agoCan someone elaborate on point 2 about 3rd party JS libraries? How does Angular 2 allow these libraries to work out of box? For example, masonry or Google Maps JavaScript SDK. In Angular 1 the only way to use them without resorting into angular-XYZ libraries is to put them in a directive and use the link function to write all the logic and DOM manipulation. What's different in Angular 2?
- EugeneOZ 10y agoAngular uses Zone.JS for it.
- cybernet 10y agoOp probably mean, that there is no Angular/ outside world barrier ( which often required using $apply function ). >In Angular 1 the only way to use them without resorting into angular-XYZ libraries is to put them in a directive and use the link function to write all the logic and DOM manipulation. What's different in Angular 2? Well, there is no $scope in Angular 2, so there is no need for link function ( which was used for linking scope and DOM)
- namelezz 10y agoDo you know of any large projects that use Angular 2? I just want see how readable the projects are.
- cybernet 10y agoGoogle AdWords - hope thats big enough.
- skybrian 10y agoA caveat: they are using the Dart fork (now maintained by the Dart team) which is not what this announcement is about. Not sure what the biggest Typescript app is.
- softawre 10y agoAs far as raw TypeScript apps, VS Code and TypeScript itself are pretty good examples. https://github.com/Microsoft/vscode https://github.com/Microsoft/vscode https://github.com/Microsoft/typescript https://github.com/Microsoft/typescript
- rplst8 10y agoI'd like some good examples too that aren't barebones tutorials.
- quaffapint 10y agoNot sure if this helps, but trying to learn Angular2 I wrote a weather app with it using RC5. It is not the cleanest and I never used Angular 1 so I can't do a comparison. https://github.com/mattsmithdev/weathercard.angular2 https://github.com/mattsmithdev/weathercard.angular2
- lloyd-christmas 10y agoyou can refactor those nested observables using mergeMap: this._settingsService.settings$.mergeMap(settings => { this.settings = settings; return this._weatherService.getLatestWeather(this._location, settings); }) .subscribe( weather => this.weather = weather, error => this.errorMessage = <any>error );
- awjr 10y agoI really really really wish they'd called it something like Bosium just to make searching for issues a lot easier. I keep coming across angular 1 solutions.
- deleted 10y ago[deleted]
- Kiro 10y ago> 3. Idea of `(events)` and `[attributes]` is awesome, works really effective and makes code much more easy to read. This is encouraging. I always thought that looked aweful so it's nice to hear that it actually makes sense.
- eranation 10y agoWell it's a bit confusing / weird at first until you get used to it but the real confusing syntax is the mix of both for bidirectional binding, e.g. [(ngModel)], but after reading the docs it kinds of makes sense. Awesome job, love it so far.
- tiziano88 10y agoHaving used ng2 in production for a while, I personally dislike the model behind this, mainly because it is not actually symmetric as it appears from a first look: - input: ``` <foo [x]="y"></foo> ``` - output: ``` <foo (x)="y = $event"></foo> ``` To me this seems unfinished and inelegant; note also that everything is inherently mutable, but change detection will work best when the bound input values are reassigned, but if they are instead mutated at some deeper level, Angular will have trouble tracking those changes, and may behave in weird ways, which are often tricky to debug.
- EugeneOZ 10y agotry [()]
- alzoid 10y agoI haven't used Angular yet. From it's description it seems to be geared for making single page apps. Or a app with a few pages because it's good a binding data to an interface. Is this accurate? What is a good use case for Angular?
- emodendroket 10y agoI think you've basically got it.
- pramalin 10y agoI have used Angular in multi-page application, using Angular as a better JQuery in Spring MVC application. This setup worked well combining the best of both frameworks. Angular provided two-way binding, rendering templates (in loop), dialog box interactions, better AJAX, etc. Angular based component libraries provided calendar controls, dynamic tables, etc. Spring took care of the routing pages, handling UI requests and returning JSON response from services.
- softawre 10y agoI think we should not discount this style of building a web app. I've also had success with it. You need to think hard about whether you really need a SPA for something complex, or whether you can go back to the server completely in some instances.
- Yhippa 10y agoDid you use a templating engine at all?
- Roboprog 10y agoTaking the load off of your server, and making the user's PC/tablet do more work, as well as greatly simplifying the server code to focus on data flow, business logic and data integrity, rather than mixing in presentation and minor U/I workflow complications. Having much of what you give to the remote client be static/cacheable content, with minimal data such as JSON passed rather than ballooned out JSP/JSF (etc) templated HTML, helps bring down bandwidth requirements, as well as server processing. Of course, now you have A LOT of event handling in a client app on top of your middleware / micro-services, but I feel it is a helpful separation of concerns. I suppose in my case it helps that I would rather do more of the app in Javascript, and less in Java. YMMV, substantially - I'm pretty sure I have a minority view at work :-) We are working on a rewrite of a largish app (for a small team, anyway) at work. We already have a second, alternate, client app for our back end for a pilot project that we can now easily tackle with the new architecture. There were very few changes required on the server, just an alternate login method to automate an initial connection to a third party app (which then runs our alternate U/I in a frame), rather than an interactive SSO form. We have a "Few Pages App", rather than Single Page App. By design, we reload a small number of alternate pages after a longish task, just in case (e.g. - resource leaks, whether from our own mishandling, or some library) - not because of known issues, mind you, but just out of my own paranoia that I would rather plan to allow for minor errors rather than requiring perfection.
- morsmodr 10y agoNo thanks for the next 1 year, after Backbone, Angular 1.x, React-Redux, I am going to take a break from learning a new framework. React-Redux is simplistic with most of my coding being JS, I don't want to keep looking up documentation for ng-this and ng-that. If the framework really takes off in 12-18 months then I might consider investing some time in it.
- tigershark 10y agoI am really surprised to know that there are people that use an alpha version in production. I would never ever do that even if it was allowed, and obviously it is not allowed in my company.
- joe563323 10y agoalpha guys do that.
- sundarurfriend 10y agoOh, so that's what all these "alpha man" stuff on the Internet is about: folks who are manly enough to use alpha versions in production. Makes sense now. People who only take it up at the beta stage are obviously inferior, and hence denigrated as "beta men". And then there's the detestable wimps who go only for 'stable' versions, I suppose they must be "omega men", not even worthy of a mention in discussions. Glad to know Real Programmers[1] still exist amongst us. [1] https://www.cs.utah.edu/~elb/folklore/mel.html https://www.cs.utah.edu/~elb/folklore/mel.html
- EugeneOZ 10y agoWe started using it for internal web app, were satisfied by the level of quality and then switched main site to Angular 2.