Angular 4 reduces footprint, adds features

The latest version of the JavaScript framework reduces the size of generated code by more than half and moves to TypeScript 2.1

Angular 4.0.0, the latest upgrade to the popular JavaScript framework for mobile and desktop development, was released by Google late yesterday afternoon.

The upgrade features view engine improvements making Angular smaller and faster and helping developers build smaller applications. “We’ve made changes under to hood to what AOT-generated (ahead of time) code looks like,” Stephen Fluin, a Google developer advocate for Angular, said in a bulletin received by InfoWorld close to press time. “These changes should reduce the size of the generated code for your components by more than half in some cases.”

According to Google metrics, generated code had been about 10 times the size of the original template. “With this release, generated code is now only 3 times the size of the original template,” the bulletin said. Angular’s builders had heard from developers that migrating to the new version, which had been available in a release candidate form, had reduced production bundles by hundreds of kilobytes.Version 4.0.0 follows a release schedule detailed late last year in which the company jumped right from Angular 2, which arrived last September, to Angular 4. The framework was rewritten with TypeScript, Microsoft’s typed superset of JavaScript, with the Angular 2 release, and version 4 uses TypeScript 2.1. Moving to the newer version of TypeScript means better type-checking throughout an application as well as better speed for ngc, the compiler for Angular templates.

Also with version 4.0.0, animations have been pulled out of @angular/core and put into their own package. “This means that if you don’t use animations, this extra code will not end up in your production bundles,” the bulletin said. With this change, developers can more easily find documentation and take better advantage of autocompletion. The template binding syntax in the framework now lets developers use an if/else style syntax and assign local variables such as when unrolling an observable.

Angular Universal, which lets developers run Angular on a server, has been brought up to date with Angular again, Fluin said. “This release now includes the results of the internal and external work from the Universal team over the last few months,” he said. “The majority of the Universal code is now located in @angular/platform-server.”

In other improvements, when an error is caused by something in a template, source maps will be generated to provide a meaningful context in terms of the original template. Also, flattened versions of Angular modules are now offered. “This format should help tree-shaking, help reduce the size of your generated bundles, and speed up build, transpilation, and loading in the browser in certain scenarios,” according to Google.

Known issues with the upgrade include Google recommending leaving TypeScript’s StrictNullChecks setting turned off, as more work needs to be done in this vein. Developers should use NPM to update to version 4.0.0 on Windows, Linux, and Mac systems. Google also is working on an interactive Angular Upgrade Guide, featuring information on making changes to applications.

Angular has been popular with developers, recently rated as the second-most-wanted framework behind Node.js in a recent Stack Overflow survey of developers. Upcoming releases planned for Angular include versions 5.0.0, due in September or October, and 6.0.0, due a year from now. Version 4.1 also is planned.

Source Via Infoworld

Hi, I’m self-motivated professional, possess 6 years of comprehensive expertise in software design and development.

As the Managing Director & CTO of Elegant Tech, I’m always making sure that the development team is following the best practices and the latest standards in the industry.

On the other hand, I’m helping Elegant Tech’s clients to fulfill their needs through developing to them an end to end solutions that would help and ease their business tasks.

Starting new project? Book your free consultation session with me.

You Might Also Like

CONTACT US
221, Mount Olimpus, Rheasilvia, Mars,
Solar System, Milky Way Galaxy
+1 (999) 999-99-99
PGlmcmFtZSBzcmM9Imh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vbWFwcy9lbWJlZD9wYj0hMW0xOCExbTEyITFtMyExZDYwNDQuMjc1NjM3NDU2ODA1ITJkLTczLjk4MzQ2MzY4MzI1MjA0ITNkNDAuNzU4OTkzNDExNDc4NTMhMm0zITFmMCEyZjAhM2YwITNtMiExaTEwMjQhMmk3NjghNGYxMy4xITNtMyExbTIhMXMweDAlM0EweDU1MTk0ZWM1YTFhZTA3MmUhMnNUaW1lcytTcXVhcmUhNWUwITNtMiExc2VuITJzITR2MTM5MjkwMTMxODQ2MSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZnJhbWVib3JkZXI9IjAiIHN0eWxlPSJib3JkZXI6MCI+PC9pZnJhbWU+
Thank You. We will contact you as soon as possible.
COMPANY NAME
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio. Diam lorem auctor sit, a a? Lundium placerat mus massa nunc habitasse.
  • Goblinus globalus fantumo tubus dia montes
  • Scelerisque cursus dignissim lopatico vutario
  • Montes vutario lacus quis preambul denlac
  • Leftomato denitro oculus softam lorum quis
  • Spiratio dodenus christmas gulleria tix digit
  • Dualo fitemus lacus quis preambul patturtul
CONTACT US
Thank You. We will contact you as soon as possible.
PGlmcmFtZSBzcmM9Imh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vbWFwcy9lbWJlZD9wYj0hMW0xOCExbTEyITFtMyExZDYwNDQuMjc1NjM3NDU2ODA1ITJkLTczLjk4MzQ2MzY4MzI1MjA0ITNkNDAuNzU4OTkzNDExNDc4NTMhMm0zITFmMCEyZjAhM2YwITNtMiExaTEwMjQhMmk3NjghNGYxMy4xITNtMyExbTIhMXMweDAlM0EweDU1MTk0ZWM1YTFhZTA3MmUhMnNUaW1lcytTcXVhcmUhNWUwITNtMiExc2VuITJzITR2MTM5MjkwMTMxODQ2MSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZnJhbWVib3JkZXI9IjAiIHN0eWxlPSJib3JkZXI6MCI+PC9pZnJhbWU+
Thank You. We will contact you as soon as possible.
COMPANY NAME
CONTACT US
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio putonius mudako empero brutto populius giten facilisis cursus turpis balocus tredium todo.
Thank You. We will contact you as soon as possible.
PGlmcmFtZSBzcmM9Imh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vbWFwcy9lbWJlZD9wYj0hMW0xOCExbTEyITFtMyExZDYwNDQuMjc1NjM3NDU2ODA1ITJkLTczLjk4MzQ2MzY4MzI1MjA0ITNkNDAuNzU4OTkzNDExNDc4NTMhMm0zITFmMCEyZjAhM2YwITNtMiExaTEwMjQhMmk3NjghNGYxMy4xITNtMyExbTIhMXMweDAlM0EweDU1MTk0ZWM1YTFhZTA3MmUhMnNUaW1lcytTcXVhcmUhNWUwITNtMiExc2VuITJzITR2MTM5MjkwMTMxODQ2MSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZnJhbWVib3JkZXI9IjAiIHN0eWxlPSJib3JkZXI6MCI+PC9pZnJhbWU+
CONTACT US
COMPANY NAME
221, Mount Olimpus, Rheasilvia, Mars
Solar System, Milky Way Galaxy
+1 (999) 999-99-99
Thank You. We will contact you as soon as possible.
Macbook Pro
* Intel Core i7 (3.8GHz, 6MB cache)
* Retina Display (2880 x 1880 px)
* NVIDIA GeForce GT 750M (Iris)
* 802.11ac Wi-Fi and Bluetooth 4.0
* Thunderbolt 2 (up to 20Gb/s)
* Faster All-Flash Storage (X1)
* Long Lasting Battery (9 hours)
PGlmcmFtZSB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBzcmM9Ii8vd3d3LnlvdXR1YmUuY29tL2VtYmVkL3NCV1BDdmR2OEJrP2F1dG9wbGF5PTEiIGZyYW1lYm9yZGVyPSIwIiBhbGxvd2Z1bGxzY3JlZW4+PC9pZnJhbWU+
ENJOY AURORA BOREALIS
SHARE
OR
SUBSCRIBE
Vel eros amet amet mauris a habitasse scel erisque? Vel urna dis et, placerat phasellus, diam in! Placerat nec facilisis, tortor tristique. Arcu placerat sagittis, velit lorem scelerisque egestas placerat phasellus.
PLEASE SHARE US!
Vel eros amet amet mauris a habitasse scelerisque? Vel urna dis et, placerat phasellus, diam in! Placerat nec facilisis, tortor tristique. Arcu placerat sagittis, velit lorem scelerisque egestas. Lundium et, ultrices, et tempor vel proin est! Lundium sociis ac, ut ultricies ridiculus ultricies pulvinar scelerisque et adipiscing auctor, urna platea non rhoncus magna egestas montes platea sed porta nisi porta, mus integer porta elit.
PGlmcmFtZSB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBzcmM9Imh0dHA6Ly93d3cueW91dHViZS5jb20vZW1iZWQvajhsU2NITzJtTTAiIGZyYW1lYm9yZGVyPSIwIiBhbGxvd2Z1bGxzY3JlZW4+PC9pZnJhbWU+
Increase more than 700% of Email Subscribers!
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio. Diam lorem auctor sit, a a? Lundium placerat mus massa nunc habitasse, arcu, etiam pulvinar.
  • Goblinus globalus fantumo tubus dia
  • Scelerisque cursus dignissim lopatico
  • Montes vutario lacus quis preambul den
  • Leftomato denitro oculus softam lorum
  • Spiratio dodenus christmas gulleria tix
  • Dualo fitemus lacus quis preambul pat
  • Montes vutario lacus quis digit turtulis
  We hate spam and never share your details.
ARE YOU READY? GET IT NOW!
Increase more than 500% of Email Subscribers!
Your Information will never be shared with any third party.
SUBSCRIBE TO NEWSLETTER
Turpis dis amet adipiscing hac montes odio ac velit? Porta, non rhoncus vut, vel, et adipiscing magna pulvinar adipiscing est adipiscing urna. Dignissim rhoncus scelerisque pulvinar?
GET IT NOW
500% MORE SUBSCRIBERS
EFFICIENCY
BOOST YOUR SALES
CREATIVITY
INSPIRE YOUR VISITORS
BE UNIQUE
CREATE UNIQUE POPUPS
ARE YOU READY? GET IT NOW!
Increase more than 500% of Email Subscribers!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis viverra, urna vitae vehicula congue, purus nibh vestibulum lacus, sit amet tristique ante odio.
ENTER YOUR NAME
ENTER YOUR E-MAIL
ENTER YOUR PHONE NUMBER
Your Information will never be shared with any third party.
SUBSCRIBE TO NEWSLETTER
All rights reserved © Company Name, 2014
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio, cursus montes ac turpis. Ultrices! Massa integer augue ridiculus adipiscing, massa cras pid. Turpis placerat scelerisque, vut odio mus non, mattis porttitor, nunc odio, turpis tortor sit? Pid amet, sed facilisis.
  • Goblinus globalus fantumo tandempo
  • Scelerisque cursus dignissim donus
  • Montes vutario lacus quis arcupolisio
  • Leftomato denitro oculus tepircos den
  • Spiratio dodenus christmas popupius
  • Afrenius globalus spiritum tandempo
  • Fitatos vutario lacus quis arcup delis
Do you want massive traffic?
Dignissim enim porta aliquam nisi pellentesque. Pulvinar rhoncus magnis turpis sit odio pid pulvinar mattis integer aliquam!
  • Goblinus globalus fantumo tubus dia montes
  • Scelerisque cursus dignissim lopatico vutario
  • Montes vutario lacus quis preambul den lacus
  • Leftomato denitro oculus softam lorum quis
  • Spiratio dodenus christmas gulleria tix digit
  • Dualo fitemus lacus quis preambul pat turtulis
* we never share your e-mail with third parties.
Do you want more traffic?
Dignissim enim porta aliquam nisi pellentesque. Pulvinar rhoncus magnis turpis sit odio pid pulvinar mattis integer aliquam!
  • Goblinus globalus fantumo tubus dia montes
  • Scelerisque cursus dignissim lopatico vutario
  • Montes vutario lacus quis preambul den lacus
  • Leftomato denitro oculus softam lorum quis
  • Spiratio dodenus christmas gulleria tix digit
  • Dualo fitemus lacus quis preambul pat turtulis
  • Scelerisque cursus dignissim lopatico vutario
  • Montes vutario lacus quis preambul den lacus
SUBSCRIBE TO OUR NEWSLETTER AND START INCREASING YOUR PROFITS NOW!
* we never share your e-mail with third parties.
Do you want massive traffic?
Scelerisque augue ac hac, aliquet, nascetur turpis. Augue diam phasellus odio lorem integer, aliquam aliquam sociis nisi adipiscing hacac.
  • Goblinus globalus fantumo tubus dia
  • Scelerisque cursus dignissim lopatico
  • Montes vutario lacus quis preambul
  • Leftomato denitro oculus softam lorum
  • Spiratio dodenus christmas gulleria tix
  • Dualo fitemus lacus quis preambul bela
PGlmcmFtZSB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBzcmM9Imh0dHA6Ly93d3cueW91dHViZS5jb20vZW1iZWQvajhsU2NITzJtTTAiIGZyYW1lYm9yZGVyPSIwIiBhbGxvd2Z1bGxzY3JlZW4+PC9pZnJhbWU+
* we never share your details with third parties.
Impressed you enough?
Subscribe today to receive the latest articles and news in the software development industry.
Your Information will never be shared with any third party.