<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ angular6 - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ angular6 - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 15:49:11 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/angular6/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Angular vs React: Which One to Choose for Your App ]]>
                </title>
                <description>
                    <![CDATA[ A precise side-by-side comparison of general and technical aspects of Angular and React There are so many articles titled “Angular vs React”, “React vs Angular”, “Angular or React” – it is a miracle you opened this one! What these articles are missin... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/angular-vs-react-what-to-choose-for-your-app-2/</link>
                <guid isPermaLink="false">66be14af9f6cdc38e7dec50b</guid>
                
                    <category>
                        <![CDATA[ Angular ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular 5 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular2 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular6 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular8 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Angular ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Oleh Romanyuk ]]>
                </dc:creator>
                <pubDate>Tue, 08 Oct 2019 13:49:33 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/10/react-vs-angular.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <h3 id="heading-a-precise-side-by-side-comparison-of-general-and-technical-aspects-of-angular-and-react">A precise side-by-side comparison of general and technical aspects of Angular and React</h3>
<p>There are so many articles titled “Angular vs React”, “React vs Angular”, “Angular or React” – it is a miracle you opened this one! What these articles are missing, however, is a precise <strong>side-by-side comparison</strong> of Angular vs React. </p>
<blockquote>
<p>So this is what I am going to do in this blog post: to place <a target="_blank" href="https://keenethics.com/tech-front-end-react">React</a> and <a target="_blank" href="https://keenethics.com/tech-front-end-angular">Angular</a> in direct juxtaposition. We're going to review and contrast the two JavaScript frameworks and look at each possible characteristic to make sure we don't miss even a single piece of data. </p>
</blockquote>
<p>In the end, I am not going to tell you which technology to choose. But I will give you enough food for thought for you to choose the technology that suits you and your project best.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/Angular_React_comparison-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/2PpsrJKGRiYFYhCXh9NcfM/c43b9b24509d459ec94d7f7bb6ce207a/search__1_.png?h=300" alt="search (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-1-brief-overview">1. Brief Overview</h2>
<h3 id="heading-react">React</h3>
<p>React is a JavaScript library for UI development. It is managed by Facebook and an open-source community of developers.</p>
<p>The framework was introduced in May 2013.</p>
<p>The latest updates were released on August 8th, 2019 – just over a month ago.</p>
<h3 id="heading-angular">Angular</h3>
<p>Angular is an open-sourced JavaScript framework for web and mobile development. It is TypeScript-based and managed by Google’s Angular Team and the Angular developer community. </p>
<p>Launched in September 2016, Angular (also known as Angular 2.0) is a complete rewrite of AngularJS (Angular 1.0), which was introduced in 2010. </p>
<p>There have been six versions of Angular already, and the latest release took place on August 28th, 2019 – almost three weeks ago.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/26X0F8SysU9aRODLpiTS8T/6d17ff52d723a3d8b34b54a4f53f6e34/internet__1_.png?h=300" alt="internet (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-2-universality">2. Universality</h2>
<h3 id="heading-react-1">React</h3>
<p>React is a framework used in both web and mobile development. However, for mobile development, it needs to be incorporated with Cordova. Moreover, for mobile development, there is an additional framework – React Native.</p>
<p>React can be used to build both single-page and multiple-page web applications.</p>
<h3 id="heading-angular-1">Angular</h3>
<p>Angular is suitable for both web and mobile development. In mobile development, however, a great share of work is done by Ionic. Furthermore, similarly to React, Angular has an additional mobile development framework. The counterpart of React Native is NativeScript. </p>
<p>Angular can also be used for both single- and multiple-page web apps.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/7EP4F57YmLWZvF7OO0iDTX/b7ba3aacd67d576f1fcc49ba78478916/success__1_.png?h=300" alt="success (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-3-self-sufficiency">3. Self-Sufficiency</h2>
<h3 id="heading-react-2">React</h3>
<p>React is a framework for UI development, so apps written with React need additional libraries to be used. For instance, Redux, React Router, or Helmet optimize the processes of state management, routing, and interaction with the API. Such functions as data binding, component-based routing, project generation, form validation, or dependency injection require additional modules or libraries to be installed.</p>
<h3 id="heading-angular-2">Angular</h3>
<p>Angular is a full-fledged framework for software development, which usually does not require additional libraries. All the above-mentioned functions – data binding, component-based routing, project generation, form validation, and dependency injection – can be implemented with the means of Angular package.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/pFVFckO96mf60jYoDLsXA/df1d17d0c516c24b906feacc66a36b2d/open-book.png?h=300" alt="open-book" width="256" height="256" loading="lazy"></p>
<h2 id="heading-4-learning-curve">4. Learning Curve</h2>
<h3 id="heading-react-3">React</h3>
<p>React is minimalistic: no dependency injection, no classic templates, no overly complicated features. The framework will be quite simple to understand if you already know JavaScript well. </p>
<p>However, it takes quite some time to learn how to set up a project because there is no predefined project structure. You also need to learn the Redux library, which is used in more than half of React applications for state management. Constant framework updates also require additional effort from the developer. Furthermore, there are quite a lot of best practices in React, which you will need to learn to do things right.</p>
<h3 id="heading-angular-3">Angular</h3>
<p>Angular itself is a huge library, and learning all the concepts associated with it will take much more time than in the case of React. Angular is more complex to understand, there is a lot of unnecessary syntax, and component management is intricate. Some complicated features are embedded into the framework core, which means that the developer cannot avoid learning and using them. Moreover, there are a lot of ways of solving a single issue. </p>
<p>Although TypeScript closely resembles JavaScript, it also takes some time to learn. Since the framework is constantly updated, the developer needs to put some extra learning effort.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/3UoGpyTMCV8CGu1Z4kjpse/d32f947e97c9ca59b8d06ffa3cbcab5e/users__1_.png?h=300" alt="users (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-5-community">5. Community</h2>
<h3 id="heading-react-4">React</h3>
<p>React framework is one of the most popular JS frameworks worldwide, and the community supporting and developing it is huge.</p>
<p>Working with React, you have to be a continuous learner since the framework is often updated. While the community tries to go forward with the latest documentation as swiftly as possible, keeping up with all the changes is not that easy. Sometimes, there may be a lack of documentation, but the issue is often solved by the community support on thematic forums. </p>
<p>React is actively used by such companies as Facebook, Twitter, Netflix, Airbnb, PayPal, The New York Times, Yahoo, Walmart, Uber, and Microsoft.</p>
<h3 id="heading-angular-4">Angular</h3>
<p>Angular is less admired than React and faces a lot of skepticism, partially because of the unpopularity of Angular 1.0. Developers used to dismiss the framework as an overly complicated one as it required a lot of time to be spent learning. However, this framework has been developed by Google, which works in favor of Angular’s credibility. </p>
<p>Google provides the long-term support of the framework and constantly improves it. However, the updates are so fast that the documentation often falls behind. </p>
<p>Angular is used by such companies as McDonald’s, AT&amp;T, HBO, Apple, Forbes, Adobe, Nike, and Microsoft as well.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/42G1ot0FKIiLsLEss57U7C/afa7f06c694c2481af01923ade2c1f90/settings__1_.png?h=300" alt="settings (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-6-performance">6. Performance</h2>
<h3 id="heading-react-5">React</h3>
<p>React’s performance is greatly improved with the introduction of the virtual DOM. Since all virtual DOM trees are lightweight and built on server, the load on browser is reduced. Furthermore, since the data-binding process is unidirectional, bindings are not assigned watchers as in the case of Angular. Respectively, no additional workload is created.</p>
<h3 id="heading-angular-5">Angular</h3>
<p>Angular performs worse, especially in the case of complex and dynamic web apps. </p>
<p>The performance of Angular apps is negatively affected by bidirectional data-binding. Each binding is assigned a watcher to track changes, and each loop continues until all the watchers and associated values are checked. Because of this, the more bindings you have, the more watchers are created, and the more cumbersome the process becomes. </p>
<p>However, the most recent update of Angular has greatly improved its performance, and it does not lose to React anymore. Moreover, the size of an Angular application is slightly smaller than the size of a React app.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/LCPTXwhsTKQ4YasbWaJBg/3ecbcedd4687993fcca72086a16abc0f/menu__1_.png?h=300" alt="menu (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-7-language">7. Language</h2>
<h3 id="heading-react-6">React</h3>
<p>React is based on JavaScript ES6+ combined with JSX script. JSX is an extension for syntax, which makes a JavaScript code resemble that written in HTML. This makes the code easier to understand, and typos are easier to spot. For the JSX code to be compiled in a browser, React is augmented with Babel – a code translation tool.</p>
<h3 id="heading-angular-6">Angular</h3>
<p>Angular can use JavaScript or TypeScript, which is a superset of JS developed specifically for larger projects. TypeScript is more compact than JavaScript, the code is easier to navigate, and typos are easily spotted. Code refactoring process also becomes simpler and faster.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/34RQEkHFyn2MwWWbUxVwyx/d621c2de5692fb4b686b3702472676ab/layers__2_.png?h=300" alt="layers (2)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-8-app-structure">8. App Structure</h2>
<h3 id="heading-react-7">React</h3>
<p>The structure of React provides developers with the freedom to choose. There is no “the only right structure” for a React app. However, the necessity to design the app structure at the beginning of each project makes it more difficult and longer to start.</p>
<p>Besides, React offers only View layer, while Model and Controller are added with the usage of other libraries.</p>
<p>The architecture of a React app is component-based. The code is made of React components, which are rendered with React DOM library and directed in two ways: functional (with a function that returns JSX)...</p>
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Hello</span>(<span class="hljs-params">props</span>)</span>{
<span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>Hello {props.name}<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
}
</code></pre>
<p>...and class-based (with ES6 classes).</p>
<pre><code class="lang-js"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Hello</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
render() {
<span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, {this.props.name}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>;
}
</code></pre>
<h3 id="heading-angular-7">Angular</h3>
<p>The structure of Angular is fixed and complex, suitable for experienced developers.</p>
<p>Angular is based on three layers – Model, Controller, and View. An object responsible for the Model is initialized by the Controller and displayed with the View.</p>
<p>The application code consists of different Angular components, each being written in four separate files: a TypeScript to implement the component, an HTML file to define the view, a CSS file to define the stylistic features, and a special file for testing purposes. Links to these files are written in the app directive, which displays the structural logic of the app. Respectively, Angular components are also reusable.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { Component } <span class="hljs-keyword">from</span> <span class="hljs-string">'@angular/core'</span>;
@Component({
<span class="hljs-attr">selector</span>: <span class="hljs-string">'my-app'</span>,
<span class="hljs-attr">templateUrl</span>: <span class="hljs-string">'./app.component.html'</span>,
<span class="hljs-attr">styleUrls</span>: [<span class="hljs-string">'./app.component.css'</span>]
})
<span class="hljs-keyword">export</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">AppComponent</span> </span>{ }
</code></pre>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1jnhjOLhvVfIJpf1JjAFlO/e14f81b5efdca246c0d2beab0e49c2f0/app__1_.png?h=300" alt="app (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-9-ui-components">9. UI Components</h2>
<h3 id="heading-react-8">React</h3>
<p>UI tools for React are developed by the community. There are a lot of free and paid UI components on the React portal. To use material design components in React, you would have to install an additional library – Material-UI Library &amp; Dependencies.</p>
<h3 id="heading-angular-8">Angular</h3>
<p>Angular has a built-in Material toolset, and it offers a variety of pre-built material design components. There are various buttons, layouts, indicators, pop-ups, and form controls. Because of this, UI configuration becomes simpler and faster.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/27zKcdqY3mOnzT5p8vrQbC/e987f42102e8875d0f7714d8db3288f8/file__1_.png?h=300" alt="file (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-10-directives">10. Directives</h2>
<h3 id="heading-react-9">React</h3>
<p>In React, templates and logic are explained in one place – at the end of the component. It allows the reader to quickly grasp the meaning of the code even if they do not know the syntax.</p>
<h3 id="heading-angular-9">Angular</h3>
<p>In Angular, each template is returned with an attribute – a directive of how the object has to be set. The syntax of Angular directives is complex and sophisticated, which makes it incomprehensible for a reader without any experience in working with this technology.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/4I2aqTboict17ysz5yGD4n/5a7fc19e15889f42b7561d34b18edae9/controls__1_.png?h=300" alt="controls (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-11-state-management">11. State Management</h2>
<h3 id="heading-react-10">React</h3>
<p>In React, each component has its own state. A React developer can create special components for holding the state of the entire application or a particular part of it. The major disadvantage here consists in the fact that the global state needs to be stored in multiple different parts of the app with data being manually passed around different component tree levels.</p>
<pre><code class="lang-js"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Clock</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
  <span class="hljs-keyword">constructor</span>(props) {
    <span class="hljs-built_in">super</span>(props);
   <span class="hljs-built_in">this</span>.state = {<span class="hljs-attr">date</span>: <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>()};
 }
  render() {
    <span class="hljs-keyword">return</span> (
      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello world!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Now is {this.state.date.toLocaleTimeString()}.<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    );
  }
}
</code></pre>
<p>To solve this problem, there is a special state management library – Redux. The idea of it is that the global state is represented as a single stateful object, which is altered in different parts of the app with the help of reducers – special Redux functions.</p>
<p>Another solution is offered by the state management library MobX. Unlike Redux with the global state stored in a single immutable stateful object, MobX offers storing only the minimal required state, while the rest of it can be derived.</p>
<h3 id="heading-angular-10">Angular</h3>
<p>In Angular, component data is stored in component properties. Parent components pass data through to children ones. State changes in some parts can be identified and recalculated, but in a large app, it can cause a multi-directional tree series of updates, which will be difficult to track. The features can be improved with the help of state management libraries, such as NgRx or RxJS , which would make sure that the data flow is unidirectional.</p>
<pre><code class="lang-js"><span class="hljs-keyword">export</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">HeroListComponent</span> <span class="hljs-title">implements</span> <span class="hljs-title">OnInit</span> </span>{
  <span class="hljs-attr">heroes</span>: Hero[];
  selectedHero: Hero;
  <span class="hljs-keyword">constructor</span>(private service: HeroService) { }
  ngOnInit() {
    <span class="hljs-built_in">this</span>.heroes = <span class="hljs-built_in">this</span>.service.getHeroes();
  }
  selectHero(hero: Hero) { <span class="hljs-built_in">this</span>.selectedHero = hero; }
}
</code></pre>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/1FrBshReFNJB1yDkeNVBPr/091aac131dccf0267061a450f76fb897/network__1_.png?h=300" alt="network (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-12-dependency-injection">12. Dependency Injection</h2>
<h3 id="heading-react-11">React</h3>
<p>React does not fully support dependency injection as it does not fully comply with the idea of functional programming and data immutability. Instead, it has a global state for all components.</p>
<h3 id="heading-angular-11">Angular</h3>
<p>The greatest advantage of Angular rests in the fact that, unlike React, it supports dependency injection. Therefore, Angular allows having different lifecycles for different stores.</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> { Injectable } <span class="hljs-keyword">from</span> <span class="hljs-string">'@angular/core'</span>;
<span class="hljs-keyword">import</span> { HEROES } <span class="hljs-keyword">from</span> <span class="hljs-string">'./mock-heroes'</span>;
@Injectable({
  <span class="hljs-comment">// we declare that this service should be created</span>
  <span class="hljs-comment">// by the root application injector.</span>
  <span class="hljs-attr">providedIn</span>: <span class="hljs-string">'root'</span>,
})
<span class="hljs-keyword">export</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">HeroService</span> </span>{
  getHeroes() { <span class="hljs-keyword">return</span> HEROES; }
}
</code></pre>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/4FJFtvDwvmQdgsCUx5MYOO/b87ee7b57de5908ef20405e95b707959/unlink__1_.png?h=300" alt="unlink (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-13-data-binding">13. Data Binding</h2>
<h3 id="heading-react-12">React</h3>
<p>Data binding stands for the data synchronization process between Model and View. React should be augmented with Redux, which allows you to work with immutable data and makes data flow unidirectional. Unidirectional binding is predictable, which facilitates the debugging process.</p>
<h3 id="heading-angular-12">Angular</h3>
<p>Angular works with bidirectional data-binding and mutable data. While the advantages of mutable and immutable data are a matter of a heated discussion, it is definitely easier to work with bidirectional data-binding rather than with the unidirectional approach. At the same time, bidirectional data-binding negatively affects the performance since Angular automatically develops a watcher for each binding.</p>
<p>The ways of data-binding in Angular:</p>
<pre><code class="lang-js">{{expression}}   Interpolation
[target]=<span class="hljs-string">"expression"</span>    Property
bind-target=<span class="hljs-string">"expression"</span>    Attribute
</code></pre>
<pre><code class="lang-js">(target)=<span class="hljs-string">"statement"</span> Event
on-target=<span class="hljs-string">"statement"</span> Event
</code></pre>
<pre><code class="lang-js">[(target)]=<span class="hljs-string">"expression"</span> Two-way
bindon-target=<span class="hljs-string">"expression"</span> Two-way
</code></pre>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/2mOdA6gBK5MqwjRRdgm5Mm/d679f1314811e0ba93ae2b106ddbf5f1/shuffle__1_.png?h=300" alt="shuffle (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-14-change-rendering">14. Change Rendering</h2>
<h3 id="heading-react-13">React</h3>
<p>React uses a virtual Document Object Model (DOM), which enables easily implementing minor data changes in one element without updating the structure of the entire tree. The framework creates an in-memory cache of data structure, computes the changes, and efficiently updates the DOM displayed in the browser. This way, the entire page seems to be rendered on each change, whereas actually, the libraries render changed subcomponents only. </p>
<p>The React team is constantly improving Fiber – a mechanism aimed at boosting the productivity of change rendering.</p>
<h3 id="heading-angular-13">Angular</h3>
<p>Angular uses a real DOM, which updates the entire tree structure even when the changes have taken place in a single element. The real DOM is considered to be slower and less effective than the virtual DOM. </p>
<p>To compensate for this disadvantage, Angular uses change detection to identify components that need to be altered. Therefore, the real DOM on Angular performs as effectively as the virtual DOM on React.</p>
<p><img src="https://images.ctfassets.net/6xhdtf1foerq/77lE2Lv97WHOpaxBVDPjfX/2b4e6f55becbd8aae05b983cb072f3c7/edit__1_.png?h=300" alt="edit (1)" width="256" height="256" loading="lazy"></p>
<h2 id="heading-15-tools">15. Tools</h2>
<h3 id="heading-react-14">React</h3>
<p>React is supported by multiple code editors. For instance, the code in React can be edited with <a target="_blank" href="https://www.sublimetext.com/">Sublime Text</a>, <a target="_blank" href="https://visualstudio.microsoft.com/">Visual Studio</a>, and <a target="_blank" href="https://atom.io/">Atom</a>. To bootstrap a project, you can use the Create React App (CLI) tool. In turn, server-side rendering is completed with the use of Next.js framework.</p>
<p>To test the entire app written in React, you would need multiple tools. For instance, <a target="_blank" href="https://github.com/airbnb/enzyme">Enzyme</a> for component testing, <a target="_blank" href="https://jestjs.io/">Jest</a> for testing JS code, React-unit for unit testing and so on. To debug the app in the development mode, you can use a browser extension React Dev Tools.</p>
<p>Another interesting tool is <a target="_blank" href="https://github.com/facebook/react-360">React 360</a>, which is a library used for creating AR and VR applications.</p>
<h3 id="heading-angular-14">Angular</h3>
<p>Similarly to React, Angular is supported by a variety of code editing tools. For example, you may work with such code editors as <a target="_blank" href="http://www.aptana.com/">Aptana</a>, <a target="_blank" href="https://www.sublimetext.com/">Sublime Text</a>, and <a target="_blank" href="https://visualstudio.microsoft.com/">Visual Studio</a>. A project can be promptly set up with <a target="_blank" href="https://cli.angular.io/">Angular CLI</a>. Server-side rendering is completed with the help of <a target="_blank" href="https://github.com/angular/universal">Angular Universal</a>.</p>
<p>Unlike React, Angular can be fully tested with a single tool. For the end-to-end testing in Angular, the platforms are <a target="_blank" href="https://jasmine.github.io/2.0/introduction.html">Jasmine</a>, <a target="_blank" href="http://www.protractortest.org/#/">Protractor</a>, and <a target="_blank" href="https://karma-runner.github.io/latest/index.html">Karma</a>. Another tool that debugs the app in the development mode is a browser extension <a target="_blank" href="https://augury.rangle.io/">Augury</a>.</p>
<h2 id="heading-to-wrap-up">To Wrap Up</h2>
<p><strong>Angular</strong> is a full-fledged mobile and web development framework. <strong>React</strong> is a framework only for UI development, which can be turned into a full-fledged solution with the help of additional libraries. </p>
<p>React seems simpler at first sight, and it takes less time to start working on a React project. However, that simplicity as the main advantage of React is neutralized because you have to learn to work with additional JavaScript frameworks and tools. </p>
<p>Angular itself is more complex and takes quite some time to master. Yet, it is a powerful tool that offers a holistic web development experience, and once you learn how to work with it, you reap the fruits. </p>
<p><strong>There is no better framework. Both are updated continuously to keep up with the competitor</strong>. For instance, while React was believed to win because of its virtual DOM, Angular equaled the score by implementing change detection. While Angular was considered to be winning because of being developed by such an authoritative company as Google, the immense devoted React community fully compensated for Google's reputation and made React similar to Angular. </p>
<p><strong>In the end, React vs Angular is all a matter of personal preference, a matter of skills and habits</strong>. As a beginner in programming, you would probably benefit more from starting with React. As an experienced developer, you just keep working with what you know better. </p>
<p>Do not forget to challenge yourself and start learning a new framework, React or Angular. As a Project Manager or a business owner outsourcing developers, you should talk to your web development team and together choose the framework that suits all of you best, whether it be Angular or React.</p>
<h2 id="heading-do-you-have-an-idea-for-either-an-angular-or-react-project">Do you have an idea for either an Angular or React project?</h2>
<p>My company KeenEthics is experienced in <a target="_blank" href="https://keenethics.com/tech-front-end-react">react development</a>, and we, also, provide outstanding <a target="_blank" href="https://keenethics.com/tech-front-end-angular">agularjs developers</a> for your projects. In case you need the following services, feel free to <a target="_blank" href="https://keenethics.com/contacts">get in touch</a><em>.</em></p>
<p>If you have enjoyed the article, you should definitely read another wonderful comparison of 2 JS frameworks: <a target="_blank" href="https://keenethics.com/blog/react-vs-svelte-how-to-build-messaging-components">React vs Svelte: How to Build Messaging Components</a>.</p>
<h2 id="heading-ps">P.S.</h2>
<p>I would like to say thank you to everyone who contributed to this article including Sergey Gornostaev and Volodya Andrushchak, full-stack software developers @ KeenEthics.</p>
<p>The original article posted on KeenEthics blog can be found here: <a target="_blank" href="https://keenethics.com/blog/angular-vs-react-what-to-choose-for-your-app">Angular vs React: Which One to Choose for Your App</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to use JavaScript libraries in Angular 2+ apps ]]>
                </title>
                <description>
                    <![CDATA[ By Mohammad Kermani Do you remember when you were learning AngularJS (version 1), and tutorials kept telling you that you don’t need to add JQuery into your project?  That hasn't changed - you don’t need to add JQuery to your Angular 2+ project. But ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-javascript-libraries-in-angular-2-apps/</link>
                <guid isPermaLink="false">66d45f66a326133d124409f5</guid>
                
                    <category>
                        <![CDATA[ Angular ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular2 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular6 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 12 Jun 2019 09:57:10 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/1_FDIQCYA3BNp9Ek-tqGeQjA-1--1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Mohammad Kermani</p>
<p><em>Do you remember when you were learning AngularJS (version 1), and tutorials kept telling you that you don’t need to add JQuery into your project?</em> </p>
<p>That hasn't changed - you don’t need to add JQuery to your Angular 2+ project. But if, for any reason, you might need to use some JavaScript libraries, you need to know how to use them in Angular. So, let’s get started from zero.</p>
<p><em>I’m going to add</em> <a target="_blank" href="http://underscorejs.org/"><em>underscore.js</em></a> <em>to a project and show you how it works.</em></p>
<h3 id="heading-1-create-a-new-project-using-angular-cli">1. Create a new project using Angular CLI</h3>
<p>If you don’t already have CLI installed on your machine, <a target="_blank" href="https://cli.angular.io/">install it</a>. After installation, create a new project (if you don’t already have one).</p>
<p>ng new learning</p>
<p>Now you will have a new Angular project named “<strong>learning</strong>”.</p>
<h3 id="heading-2-install-the-package-into-your-project">2. Install the package into your project</h3>
<p>Go to the project we just made:</p>
<p>cd learning</p>
<p>Use your preferred package manager to install the library you’re going to use; I use <code>npm</code> to install <code>underscore.js</code>.</p>
<p>npm install --save underscore</p>
<h3 id="heading-3-import-the-library-into-angular-typescript">3. Import the library into Angular (TypeScript)</h3>
<p>We are writing code in TypeScript, and we should follow its rules. TypeScript needs to understand <code>underscore.js</code>.</p>
<p>As you might know, TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript has its own syntax, function and variables can have defined types. But when we are going to use an external library such as underscore, we need to declare type definitions for TypeScript.</p>
<p>In JavaScript, the type of arguments are not important and you will not get an error while you’re writing code. But TypeScript won’t let you to give an array to a function that accepts a string as input. Then here is the question: should we rewrite the <code>underscore.js</code> in TypeScript and define types there?</p>
<p>Of course not - TypeScript provides declaration files <em>(*.d.ts)</em> which define types and standardize a JavaScript file/libraries for TypeScript.</p>
<p>Some libraries include a typing file and you don’t need to install TypeScript’s type destination for them. But in case a library does not have a  <code>.d.ts</code> file, you need to install it.</p>
<p>We just need to find and import <code>underscore.js</code> type definition file. I suggest that you use <a target="_blank" href="https://microsoft.github.io/TypeSearch/">Type Search</a> to find the declaration file for the libraries you need.</p>
<p>Search for <code>underscore</code> in <a target="_blank" href="https://microsoft.github.io/TypeSearch/">Type Sceach</a> and it redirects you to<a target="_blank" href="https://www.npmjs.com/package/@types/underscore">types/underscore</a>. Install the declaration file using the following command:</p>
<p><code>npm install --save @types/underscore</code></p>
<h3 id="heading-4-import-type-declaration-into-angular-app">4. Import type declaration into Angular app</h3>
<p>Let’s say you’re going to use underscore in your <code>app.component.ts</code> file. Open the <code>app.component.ts</code> by your IDE and add the following code in the top of the file:</p>
<pre><code><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> _ <span class="hljs-keyword">from</span> <span class="hljs-string">'underscore'</span>;<span class="hljs-comment">/*** OR simply:* import 'underscore';*/</span>
</code></pre><p>The TypeScript in that component now understands <code>_</code> and it easily works as expected.</p>
<h3 id="heading-question-how-to-use-a-library-which-does-not-have-type-definition-dts-in-typescript-and-angular">Question: How to use a library which does not have type definition (*.d.ts) in TypeScript and Angular?</h3>
<p>Create it if the <code>src/typings.d.ts</code> does not exist. Otherwise open it, and add your package to it:</p>
<pre><code>declare <span class="hljs-keyword">var</span>
</code></pre><p>In your TypeScript, now you need to import it by the given name:</p>
<pre><code><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> yourPreferedName <span class="hljs-keyword">from</span> <span class="hljs-string">'yourLibrary'</span>;yourPreferedName.method();
</code></pre><h3 id="heading-conclusion">Conclusion</h3>
<p>To wrap up, let’s make a simple example to see a working example of <code>_</code>. Open <code>app.component.ts</code> and inside the <code>appComponent</code> class write a <code>constructor</code> which returns the last item of an array using underscore's <code>_.last()</code> function:</p>
<pre><code>...
import * <span class="hljs-keyword">as</span> _ <span class="hljs-keyword">from</span> <span class="hljs-string">'underscore'</span>;
...
export <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">AppComponent</span> </span>{
  <span class="hljs-keyword">constructor</span>() {
    <span class="hljs-keyword">const</span> myArray: number[] = [<span class="hljs-number">9</span>, <span class="hljs-number">1</span>, <span class="hljs-number">5</span>];
    <span class="hljs-keyword">const</span> lastItem: number = _.last(myArray); <span class="hljs-comment">//Using underscore</span>
    <span class="hljs-built_in">console</span>.log(lastItem); <span class="hljs-comment">//5</span>
  }
}
</code></pre><p>If you open your Angular app now, you will get <code>5</code> in the console, which means we could correctly add <code>underscore</code> into our project and it’s working as expected.</p>
<p>You can add any JavaScript libraries to your project just by following the same steps.</p>
<hr>
<p>You can follow <a target="_blank" href="https://medium.com/@kermani">me</a> for more articles on technology and programming.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Angular 6 and its new features — explained in three minutes ]]>
                </title>
                <description>
                    <![CDATA[ By Said Hayani Angular has come out with some amazing new features in version 6.0.0, especially in Angular-cli. Now, with Angular 6, you can easily update your old packages, create native web elements using Angular Elements, and many other things. Le... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/angular-what-is-the-new-briefly-e6837348dd3a/</link>
                <guid isPermaLink="false">66d460c68812486a37369d3e</guid>
                
                    <category>
                        <![CDATA[ Angular ]]>
                    </category>
                
                    <category>
                        <![CDATA[ angular6 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 16 May 2018 15:11:00 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*AdGD1-LO1avzx5hNJFQoZQ.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Said Hayani</p>
<p><a target="_blank" href="https://angular.io">Angular</a> has come out with some amazing new features in <a target="_blank" href="https://angular.io/">version 6.0.0</a>, especially in Angular-cli. Now, with Angular 6, you can easily update your old packages, create native web elements using Angular Elements, and many other things. Let’s take a look!</p>
<h3 id="heading-ng-add">ng add</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*u8BWLIWdkabEzp0QSmMUgg.png" alt="Image" width="671" height="291" loading="lazy"></p>
<p><code>**ng add**</code> is a new command in Angular-cli that helps you install and download new packages in your angular apps. It works the same as npm, but it doesn’t replace it.</p>
<h3 id="heading-ng-update">ng update</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*mxQPMNmblN_8t_ky1r5G8w.png" alt="Image" width="677" height="288" loading="lazy"></p>
<p><code>**ng update**</code> is a new Angular-cli command too. It’s used to update and upgrade your packages. It’s really helpful, for example, when you want to upgrade from Angular 5 to Angular 6, or any other package in your Angular app.</p>
<h3 id="heading-declaring-the-providers-inside-the-service-itself">Declaring the providers inside the service itself</h3>
<p>Before this update, you had to the declare the providers array in <code>**app.module.ts**</code></p>
<p>Now with Angular 6, you can provide your service inside the supervisor itself by putting the <code>**providedIn:root**</code> property within the "<code>**@injectable"**</code> <strong>decorator.</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*3Huej4et-8LIfrAEhzY3pQ.png" alt="Image" width="672" height="294" loading="lazy"></p>
<h3 id="heading-use-ng-template-instead-of-template-directive">Use ng-template instead of template directive</h3>
<p>You can use <code>**ng-template**</code> to render the HTML instead of the <code>**template**</code> tag in the new version of Angular. <code>**ng-template**</code> is an Angular element, and it works when it is used with a <a target="_blank" href="https://angular.io/guide/structural-directives">structural directive</a> such as <code>***ngFor**</code> and <code>***ngIf**</code></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*6RjvjuP6weX0bPrYBbjQ8Q.png" alt="Image" width="635" height="328" loading="lazy"></p>
<h3 id="heading-angular-elements">Angular elements</h3>
<p>Angular 6 introduced us to Angular elements. You’re able to render your Angular elements as native web elements, and they’re interpreted as trusted HTML elements.</p>
<p>You can add Angular elements by running the command below:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*u8BWLIWdkabEzp0QSmMUgg.png" alt="Image" width="671" height="291" loading="lazy"></p>
<p>Import <code>**createCustomElement**</code> in your component.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*YP2ej1AXVAO9GURmbGnFcQ.png" alt="Image" width="627" height="232" loading="lazy"></p>
<p>Then create your customized element!</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*F1WAYYCRzJSyfr8PSWsMRg.png" alt="Image" width="800" height="514" loading="lazy"></p>
<p><code>**MyElemComponent.ts**</code></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*S4Ib01DNgO67jh_-habKmQ.png" alt="Image" width="652" height="559" loading="lazy"></p>
<p>The result:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*lgl-OcKiFKVLF7A9KdrImA.png" alt="Image" width="433" height="265" loading="lazy"></p>
<p><strong>Note:</strong> you have to implement the <code>**DomSanitizer**</code> method from <code>@angular/platform-browser</code> to make your custom element a trusted HTML tag .</p>
<p>You can learn more about Angular elements <a target="_blank" href="https://angular.io/guide/elements">here</a></p>
<h3 id="heading-upgrading-to-rxjs-600">Upgrading to RxJS 6.0.0</h3>
<p>Angular 6 uses the latest version of Rxjs library. Now you can enjoy the newest features of RxJS 6 in your Angular app :)</p>
<h3 id="heading-wrapping-up">Wrapping Up</h3>
<p>Angular itself doesn’t have many groundbreaking changes in the Angular core, but Angular-cli is really exciting. The Angular team is focusing more on performance, building PWAs easily, providing a good environment to work in which to work with Angular in an easy way.</p>
<p>You can find me on <a target="_blank" href="https://twitter.com/SaidHYN">Twitter</a>.</p>
<blockquote>
<p>By the way, I’ve recently worked with a strong group of software engineers for one of my mobile applications. The organization was great, and the product was delivered very quickly, much faster than other firms and freelancers I’ve worked with, and I think I can honestly recommend them for other projects out there. Shoot me an email if you want to get in touch — <a target="_blank" href="mailto:said@devsdata.com">said@devsdata.com</a>.</p>
</blockquote>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
