We’ve found Angular 2 to be an EXCELLENT language. The “tightness” of the language is both frustrating and exciting at the same time. There is an inherent sloppiness with HTML, JavaScript, and CSS. Miss a ending tag, for example, and browsers will make up for it, or maybe just display the page wrong. Angular 2 is not so nice. Your HTML is actually parsed. You miss an end
Angular 2, Is it Ready for Commercial Use?
or insert a component that isn’t recognized, and it simply won’t compile.
So, I believe, the way Angular 2 works is to take all the HTML from the component template and actually convert it into HTML DOM Objects and variables, then re-building the various bits and pieces in the DOM via javascript, just like you might add a new div or manually “lazy load” a javascript file or some jsonP.
The problem is dealing with sloppy code and custom plugins that are used all around the internet. Clients come to you with a template they saw and want THAT. Perhaps you go to themeforest and pluck out a template that would normally save you a ton of time? With AngularJS, you can just slap those right in there. Components will figure it out and, while there might be some timing issues, it’s generally not too big a problem to take an HTML template and pop it into angularJS. I actually find it relaxing, kind of like doing a puzzle. When you’re done, that themeforest template is about 10000 times faster and more easily managed.
Angular 2 cannot do that. Obviously, there is a learning curve, but it seems like, for the quick one-off projects, Angular 2 is not ready. AngularJS is really only just getting there.
But AngularJS is going to disappear, right?
Honestly, I don’t see it happening right away. They actually are quite different. The get’er-done programmer in me enjoys angularJs. I like getting those fast results and I’m not “too” concerned about scope flying all over the place on a simple website for a small business. I don’t know if Angular 2 will ever be as popular. AngularJS probably WILL go away, but I’d give it another 7-8 years. There are a LOT of people that know and love it. Moreover, those sites, if made correctly using components, can be converted fairly easily.
Show me the Money
After running a business for 15 years, I can tell you that a great many failures are caused by deciding to utlize the latest and greatest program without taking 2 things into account: 1 TIME-COST, 2. PROJECT LIFESPAN. I can make a site with AngularJS much faster than angular 2. If the site is going to last 5 years and then need an upgrade, then do it in angularJS, and charge them for the upgrade. Basically, Angular 2 WILL change a lot in 5 years, so you’d end up replacing all that code anyway.
On the other hand, if you’re making something that is not going to have a bunch of crazy plugins, and it needs to be super fast, and you want it to be locked-up tight, then Angular 2 might be the best choice. I need to do a set of calculators for an insurance company. Angular2 is going to be VERY nice for that. We need to pull in a lot of acutarial data and do some complex calculations. And we DO NOT want anyone playing with it or taking it, so we can merge the entire app into a single minified JS file attached to an index. If you wanted to do the same thing with AngularJS, you could, but it would take just as long as Angular 2, so might as well go with the newer version.
Conclusion
For now, small apps that are independent of external javascript dependencies and 3rd party plugins will be in Angular 2. Everything else will be in AngularJS. This is certain to be the case for the next year or two. After that, the number of wrappers to include sliders and things like bootstrap or foundation will be mature. Until then, you’ll spend a lot of time (money) dealing with BS setup crap when you could just have it done and an invoice in the mail.
Still, you HAVE to do some in Angular 2. Once Angular 2 is ready, you’ll need to be ready to jump on that train. The only way to stay ready is to work in it regularly. For now, I believe it will be a loss for the next 2 years that will just have to be considered an educational investment.