<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pro-Tek Blog &#187; Angular 5</title>
	<atom:link href="http://www.pro-tekconsulting.com/blog/category/angular-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pro-tekconsulting.com/blog</link>
	<description>For UI developers / UI designers and UI trends</description>
	<lastBuildDate>Thu, 05 Sep 2019 03:59:47 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.34</generator>
	<item>
		<title>WHAT’S NEW IN ANGULAR 5</title>
		<link>http://www.pro-tekconsulting.com/blog/whats-new-in-angular-5/</link>
		<comments>http://www.pro-tekconsulting.com/blog/whats-new-in-angular-5/#comments</comments>
		<pubDate>Fri, 02 Feb 2018 04:45:43 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Angular 5]]></category>
		<category><![CDATA[New in Angular 5]]></category>

		<guid isPermaLink="false">http://www.pro-tekconsulting.com/blog/?p=2410</guid>
		<description><![CDATA[<p>What’s New in Angular 5 Angular is an all-encompassing JavaScript framework that is recurrently used by the developers all over the world for building web, desktop, and mobile applications. In this article, we will be covering the new features in Angular 5 and several other changes. The update from AngularJS to Angular 2 was a [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/whats-new-in-angular-5/">WHAT’S NEW IN ANGULAR 5</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h4>What’s New in Angular 5</h4>
<p><img class="aligncenter size-medium wp-image-2420" src="http://www.pro-tekconsulting.com/blog/wp-content/uploads/2018/02/Angular-51-300x283.jpg" alt="Angular 5" width="300" height="283" /></p>
<p>Angular is an all-encompassing JavaScript framework that is recurrently used by the developers all over the world for building web, desktop, and mobile applications. In this article, we will be covering the new features in Angular 5 and several other changes.</p>
<p>The update from AngularJS to Angular 2 was a very big step forward, but it was also ill-famed for not being backward compatible. In contrast, Angular 4 brought new features despite the fact being backward compatible. And now, six months later, the latest major release is available.</p>
<p>The upgrade to Angular 5 is a new increased version. Many of the changes are done in this version are invisible.</p>
<p>The major focus of Angular 5 is to make Angular faster.</p>
<p><strong>TYPESCRIPT 2.4 SUPPORT IN ANGULAR 5</strong></p>
<p>Angular 5 now formally supports TypeScript version 2.4. Previous versions of Angular have supported TypeScript 2.3 without errors since release 4.3, including the Strict-Null-Check option.</p>
<p>Below are the some of the key features from the latest TypeScript:</p>
<p>String-based enums are a new feature introduced in TypeScript 2.4. This means that the members of an enum can now be expressed with a string instead of a number. Let’s see an example below.</p>
<p>enum Colors {Red = &#8220;RED&#8221;, Green = &#8220;GREEN&#8221;, Blue = &#8220;BLUE&#8221;,}</p>
<p>Note that in this look, string enums cannot be mapped backward like their number-based relatives. Therefore, a query like Colors [“RED”] is not possible to catch the string “Red”.</p>
<p>Also, the latest version of TypeScript advances type checking with regards to generics.</p>
<p>On the other hand, type checking is becoming stricter and the return types of generic functions can now also be inferred. For instance, the subsequent call leads to an error:</p>
<p>let foo: Promise = new Promise(resolve =&gt; {<br />
resolve(&#8220;bar&#8221;);<br />
// Error<br />
});</p>
<p>Another development is the so-called Weak-Type-Detection. Types are weak if they only own optional parameters which can now be detected. Here is an example of this kind of type:<br />
export interface Options {<br />
showSideNav?: boolean;<br />
description?: string;<br />
}</p>
<p><strong>BUILD</strong></p>
<p>Even for advanced web applications, updates in the framework are not enough, the build tooling has to be extended.</p>
<p>This is exactly what happens with Angular-CLI in other areas. The static analysis of the AOT mode is partly done in the normal build. Thus, many errors are noticed earlier at build time and not at runtime.<br />
The AOT mode has also been fast-tracked in order to support incremental builds and significantly reduce built time.</p>
<p>For faster builds, a build tool from Google called Bazel can be integrated. However, it is still in a very initial stage of development at the moment. In the future, the Google Closure Compiler can also be used more rigorously to achieve more optimized build results.</p>
<p><strong>FORMS</strong></p>
<p>To improve performance, the developer can now specify when validators should be executed in forms.</p>
<p>Every time a FormControl value is changed, the validation will be performed accordingly – potentially with every major element. In the case of more difficult validations, this can lead to an unusual worse performance.</p>
<p>With the new updateOn option, Angular 5 also allows the developer to specify more exactly when this validation should be performed. The developer can select change, which requires the previous behaviour, submit or blur options.</p>
<p><strong>USAGE WITH TEMPLATE-DRIVEN FORMS</strong></p>
<p>For forms that are defined through a template, the updateOn parameter presented with Angular 5 can also be stated. This is done at ngModelOptions, as shown in the below example:</p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;input type=&#8221;email&#8221; ngModel [ngModelOptions]=&#8221;{updateOn: &#8216;submit&#8217;}&#8221;&gt;</span></span></span></span></p>
<p>Here the setting is inherited from the element interleaving in the DOM. In the following example, the setting is made directly in the element of the form:</p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;form [ngFormOptions]=&#8221;{updateOn: &#8216;submit&#8217;}&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;input name=&#8221;email&#8221; ngModel type=&#8221;email&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;input name=&#8221;password&#8221; ngModel type=&#8221;email&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;/form&gt;</span></span></span></span></p>
<p>A subordinate element can overwrite the default value just as reactive forms.</p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;form [ngFormOptions]=&#8221;{updateOn: &#8216;submit&#8217;}&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;input name=&#8221;email&#8221; ngModel type=&#8221;email&#8221; [ngModelOptions]=&#8221;{updateOn: &#8216;blur&#8217;}&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;input name=&#8221;password&#8221; ngModel type=&#8221;email&#8221;&gt;</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">&lt;/form&gt;</span></span></span></span></p>
<p><strong>ROUTER</strong></p>
<p>The Angular Router has been stretched with additional events. Now, for example, the developer can create progress displays that will display when a route is changed. The corresponding events are ActivationStart and ActivationEnd or ChildActivationStart and ChildActivationEnd.</p>
<p>router.events</p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">// Event = RouteEvent | RouterEvent</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">.filter(e =&gt; e instanceof RouteEvent)</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">.subscribe(e =&gt; {</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">if (e instanceof ActivationStart) {</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">spinner.start();</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">} else if (e instanceof ActivationEnd) {</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">spinner.end()</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">}</span></span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Calibri, serif;"><span style="font-size: small;"><span lang="en">});</span></span></span></span></p>
<p><strong>THE VERDICT</strong></p>
<p>Angular 5 came with new features and major enhancements. It is smaller and faster. We are very happy with what</p>
<p>the Angular team achieved with this release.</p>
<p>Have you switched to Angular 5 yet? What are your opinions? Did you notice any major enhancements? Try and let us know your opinion on the new upgrade of Angular.</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/whats-new-in-angular-5/">WHAT’S NEW IN ANGULAR 5</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pro-tekconsulting.com/blog/whats-new-in-angular-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
