<?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" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[In-Depth Angular - Medium]]></title>
        <description><![CDATA[Angular web development articles focusing on core concepts in depth - Medium]]></description>
        <link>https://medium.com/in-depth-angular?source=rss----b5933c86ba74---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>In-Depth Angular - Medium</title>
            <link>https://medium.com/in-depth-angular?source=rss----b5933c86ba74---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 09:37:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/in-depth-angular" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular Dependency Injection(Custom Provider)]]></title>
            <link>https://medium.com/in-depth-angular/angular-dependency-injection-custom-provider-6c0268d74040?source=rss----b5933c86ba74---4</link>
            <guid isPermaLink="false">https://medium.com/p/6c0268d74040</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Abi Aradhya]]></dc:creator>
            <pubDate>Sun, 20 Jun 2021 08:38:58 GMT</pubDate>
            <atom:updated>2022-10-17T03:52:32.646Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raw3ggn07zdpYFE-C3OL-Q.png" /></figure><h3>Angular Dependency Injection</h3><p>Before discussing dependency injection lets understand what are dependencies first</p><ul><li>Dependencies are services or objects that the class needs to perform its function</li><li>Dependency Injection is a design pattern in which a class/ component request dependencies from external sources rather than creating them.</li></ul><p>In Angular, Component or services are injected with dependencies via the constructor arguments. Angular DI’s framework will provide dependencies calling the factory function to instantiate the dependencies.</p><p>How Services are exposed to Inject?</p><p>Its using @Injectable decorator and dependency injection provider which is declared in service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*7Knx5azeG8scbynqQXvKeA.png" /></figure><p>In the above service named AngProvidedDepService the if provided In is removed then you will get following error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*UL9k1buJLYw7q_gbOcSnTw.png" /></figure><p>No provider for “service_name”. This is because Angular not able to find any provider which will provide AngProvidedDepService.</p><h3>Lets create our own Custom Provider</h3><p>In our case we have to return AngProvideDepService which needs to provide its own dependencies also as shown below inside the function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*SASV_FfQKWPgyBtZYrri9w.png" /></figure><p>We created a Custom service provider which will return new AngProvidedDepService. Here comes one more question how will you provide dependencies to the provider that is also through Angular Dependency Injection system.</p><p>Next step is to plug this provider into Angular Dependency Injection system. There are multiple ways doing that lets provide to component inside Component decorator</p><p>We will use providers property and pass it an configuration object. In this Configuration object we will telling exactly what we are providing using a unique name to service via Injection Token.</p><p>Lets create one Unique Injection token for Angular Provided service and then pass it to the providers property available in Component annotation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*Tq-qCG_zLA38TfOhQbJCGQ.png" /></figure><p>Lets provide Configuration object to provider</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*RI2DmCsi0tpcdm_dsHKxBg.png" /></figure><ul><li>provide will have unique token for the service i.e. Injection token which is created</li><li>use factory will be provided with custom provider created</li><li>deps will have the dependencies which is needed for AngDepProvidedService to run.</li></ul><p>We have provided all these to Angular dependency Injection system so that whenever any component use this via constructor Service will be provided</p><p>Lets inject it in one of the compoent using inject decorator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*2msPssLRHY4VuvQjyPg6NA.png" /></figure><p>Summarize :</p><p>Angular Dependency Injection system will provide services or objects which were injected into components via constructor. Each Dependency has its own Injection token and provider function which will provide the instantiation. To go deeper into we have created our custom provider and Custom injection token and updated into one of the component.</p><p>Thanks for Reading…</p><p>If you liked this reading follow me on this for technical blogs</p><p><a href="https://abiaradhya.medium.com/">https://abiaradhya.medium.com/</a></p><p>abi — DEV Community Profile</p><p><a href="https://www.linkedin.com/in/abilash-s-aa305997/">Abilash S — Software Developer — Siemens Healthineers | LinkedIn</a></p><p>For Subscribing my next upcoming articles click here</p><p><a href="https://codewithabi.hashnode.dev/">CodeWithAbi</a></p><p><em>Originally published at </em><a href="https://dev.to/abilashs003/angular-dependecy-injection-custom-provider-1l3n"><em>https://dev.to</em></a><em> on June 19, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c0268d74040" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-depth-angular/angular-dependency-injection-custom-provider-6c0268d74040">Angular Dependency Injection(Custom Provider)</a> was originally published in <a href="https://medium.com/in-depth-angular">In-Depth Angular</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rxjs Cheat sheet]]></title>
            <link>https://medium.com/in-depth-angular/rxjs-cheat-sheet-9a1ae72153b4?source=rss----b5933c86ba74---4</link>
            <guid isPermaLink="false">https://medium.com/p/9a1ae72153b4</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[rxjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Abi Aradhya]]></dc:creator>
            <pubDate>Fri, 01 Jan 2021 02:00:55 GMT</pubDate>
            <atom:updated>2022-10-17T03:53:35.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XC3Jtbpy084sOVKzPERV_Q.png" /></figure><p>Disclaimer : Before reading this, This article was inspired by <strong>Vasco </strong>of Angular University who teach angular very well in his blog.</p><h3>Understanding RxJs — What are streams?</h3><p>core notion of RxJs is stream of values, before understanding observables, first Stream of values should be understood. Lets take an example of an click event triggered</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/0*8pYOFMu4jvIe2nQc.png" /></figure><p>It emits a stream of multiple values on every click.</p><p>Its the same for setInterval() which will be calling the function inside for every ‘x’ seconds. This also emits a stream of values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*od1wY53THF4uvYN6.png" /></figure><p>so you guys may be confused why am i explaining this is RxJs Course let me get into it.🙂</p><h3>What is RxJs?</h3><p>If we wish to trigger set interval after every 3 seconds of a mouse click event then we need to nest 3 stream of values/callbacks which sometimes leads to <strong>callback hell.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/0*7qoZO_cepirXQb-U.png" /></figure><p>If mouse double clicked here then two streams are emitted. Here we need a multiple stream of values to be connected and respond to events, http requests , timeouts and intervals.</p><p>Instead of using native callbacks, <strong>RxJs library is introduced to combine multiple stream of values in maintainable way.</strong></p><h3>Whats is RxJs Observable?</h3><p>To define a stream which emits values Observable is used in RxJs or in simple terms Observables are the definition/blueprint of stream of values.</p><p>Below interval$ of type Observable is defined which will emit numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/0*OcKNkikKY8ZFselr.png" /></figure><p>if Observable need to emit stream of values then we should subscribe it like how we subscribe to Netflix/amazon prime😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/0*Ki0_3dVWL0GZhERV.png" /></figure><p><strong>interval()</strong> is a function from RxJs library which emits series of number values.</p><h3>3 Core RxJs Concepts — Error, Completion and Subscriptions</h3><ul><li>subscription : callback which emits the stream of values</li><li>error : when the stream of values combined didn’t work properly and throws an error than error callback is called.</li><li>complete : completion callback is called when stream of values are completely emitted successfully.</li></ul><p>Note: Both error and completion cannot happen, either one of those will be triggered based on the stream of values emitted successfully or failed.</p><h3>Observables under the hood</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/0*S_BFg7nZ2_BhG07y.png" /></figure><p>fetch is a promise, it is very different from observables it gets executed when defined.</p><p>Lets create a <strong>custom observable</strong> and include this above promise request inside that observable.</p><pre>Observable . create () <br>// this create function is used to create custom observable</pre><p>fetch function getting courses is included into the create function of an observable and fetch function takes one parameter known as <strong>observer</strong>.</p><p><strong>Observer</strong> is the one which allows to emit stream of values, or throw error and also trigger when function gets completed and it is kept private. Its is defined inside observable.</p><p><strong>Observable</strong> doesn’t allow values to emit on its behalf we can only subscribe and get stream of values.</p><p>Observer functions to emit, complete and throwing error.</p><p>Custom Http Observable with the promise function fetch code is below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*BgMdxh2XvkOjdzsl.png" /></figure><h3>What is the use of converting promise into an Observable ?</h3><p>As we converted a promise into a Observable which means a stream of values. this stream can be combined with many Rxjs operators which parallelly states that it can combine many streams like set interval, set timeout and other apis with HTTP Observable.</p><h3>RxJs Operator — Map operator</h3><p>Operator is a way of deriving one Observable from another observable</p><p>Map operator takes an input observable and converts into to an another Observable based on the operator specified.</p><p>Passing a chain or stream of values to map function is done through pipe function.</p><p>Below code converts the payload data to array using map functionality</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*1aQW_pXbjjwDMoX2.png" /></figure><h3>Building components with RxJs — Imperative design</h3><p>In the above example lets say we need to categorize the courses into two categories beginner and advanced so that we will declare two courses array and filter inside the subscribe method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/0*21jHl48F8IQQixGh.png" /></figure><p>Above is the imperative design or approach to filter categories inside the subscribe method.</p><h3>Building components with RxJs — Reactive design</h3><p>Create 2 observables Beginner and advanced ,which is a definition and its not directly mutable and then use map operator to filter. this wont create nested subscriptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/0*5b6JyTK77Q0dVLEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*zh1CKV1qTsAfk-cp.png" /></figure><p>To display it in Html using async pipe</p><p><strong>async :</strong> Angular pipe which directly subscribe to observable and emits stream of values directly to html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/0*YdaZ2Vkdtd3IXP6L.png" /></figure><h3>sharereplay and tap operator :</h3><p>In the above example we have defined two observables (beginner and advanced) and these observables are each subscribed using async pipe . here we have two different subscriptions derived from same http$ Observable which leads to two http calls to backend which is not a feasible scenario.</p><p>To avoid multiple http requests we will use new operator sharereplay which shares the existing stream of data to all subscriptions instead of creating new.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*eD_F2idtpc_SM8xg.png" /></figure><p>If any logs to be produced while stream of values are emitted then tap() operator is used which will produce side effects while performing observable operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*QlXQqTqLbbk0KbHE.png" /></figure><h3>Observable Concatenation — InDepth explanation</h3><p>lets define three observable which emits series of numbers if subscribed . We will concat them sequentially</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*326cHfTaoNHSjHjY.png" /></figure><p><strong>of() :</strong> this function is helpful for defining al* <em>l type of observables</em>*</p><p><strong>concat()</strong> : concat function which combines stream of values will subscribe internally to the above observables and concat them only when the successor subscription completes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*uydjgntRp67s8xh7.png" /></figure><p>Below example concatinates 3 observables sequentially. If Observable source2$ gets concatinated with source1$ only when the source1$ stops emiting values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/0*vLHJvv1GOeottNv3.png" /></figure><h3>Form Draft Pre-Save Example and the RxJs Filter Operator</h3><p>Let say we have one form which has some form fields as below example and user needs to auto save the draft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/0*QTtpiAGtjHyvKGUl.png" /></figure><p>angular provides a form which is observable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*wFTPDQLbuOO9wv17.png" /></figure><p>form has a link to value observable which can connect to other observables.</p><p>Now the form field as we know its a stream of values it should be filtered and we need to get only the valid form data using <strong>filter()</strong> RxJs operator. this will filter out the valid forms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/0*KKJALg0XCINwNeQ-.png" /></figure><p>This is the first stream of values which should be combined or concatenated with second stream which will call backend api and save the draft every time any changes occur. here is the code which will combine above form Observable changes with the Http request observable. This is the practical example for Observable concatenation</p><p>first we will define a Observable which calls the Http put request to save the draft form and put inside a function like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*NMjmEbmT5k2nk2Ap.png" /></figure><p>savecourse is a method which returns observable which takes form ‘changes’ as an input and call an http put request.</p><p><strong>fromPromise() :</strong> function of rxjs which converts promise call into an observable.</p><p>after defining an second stream of observable both stream of observables should be concatenated via concatMap operator.</p><p><strong>concatMap :</strong> Rxjs operator which takes an stream of source observable and combines with the derived observable. Second input value of source observable is concatenated with derived observable only when first value of source observable completes its operation with derived observable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/0*nJ-faRBBSZ9ByUay.png" /></figure><p>Here whenever the form data is edited many times, many http requests will be triggered continuously in parallel. It should be avoided. Http request should be called only previous request is completed so to achieve this concatMap is used as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/0*q-ev90E_cfmiLlcX.png" /></figure><h3>Understanding the merge Observable combination Strategy</h3><p><strong>merge</strong> : Rxjs operator which combines multiple observable to convert into a an observable which will have stream of values emitted whenever a new values emitted in any input observable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*CH4O4tzCon9Biegr.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/0*Rux_rKgq-EcwdeRz.png" /></figure><p><strong>mergeMap</strong> :</p><p>Maps each value from stream emitted to an Observable whenever value is emitted it doesn’t wait for the previous value of source variable operation to get completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*O73a5HLDRGBCYUmm.png" /></figure><p><strong>exhaust map :</strong></p><p>Rxjs operator which ignores source observable emitted value when previous value of source observable is still not completed operation with derived observable. below example 5 is ignored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*0TBltSXOHsjDnOL0.png" /></figure><p><strong>practical use case</strong> : Multiple times button click will lead to multiple asynchronous calls to avoid those exhaust map is used so that until the operation of first value gets completed, other values emitted will be ignored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/0*T61gnep-_9YPhfdO.png" /></figure><h3>Unsubscription In Detail — Implementing a Cancellable HTTP Observable</h3><ul><li>If Httprequest should be cancelled for onflight requests then unsubscribe() should be used for the type subscription.</li><li>There are some Observables which cancellable logic should be written using AbortController.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/0*nd7KvPJ0XgtzfUKy.png" /></figure><p><strong>debounceTime and distinct until changed:</strong></p><p>If using a search option and search text is directly calling Http requests, observable will emits new value when a new character is added in search text and it creates huge backend requests to avoid debounceTime will be used.</p><p>debounce Rxjs operator takes an input argument of time to wait, When one value is emitted then operator wait until the that time ends to emit the new value of the observable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*E7ql99Z0oPBEg5fx.png" /></figure><p>distinct until changed : if search box emitting same value than to stop calling duplicate requests with same value we will use this operator</p><p>fromevent : converts events into observables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*mjOIn2QfUDcFR0vu.png" /></figure><p>switchmap operator: Rxjs Operator which unsubscribes previous value of source observable and subscribes to new value when emitted. Helpful in search functionality</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*BsFhBOdv1L_am0aj.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*K0jXlLAe42I3cZQJ.png" /></figure><p>Rxjs Error Handling strategy</p><p>catchError: provide an alternative source when error occurred and continue the observable errored out to complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/0*jmw0yg3i6cVqPCY_.png" /></figure><p>throwerror() : function which returns the observable which emits the value of error used inside catchError block to emit the error outside as an observable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*wfL9SzluhOz71XLn.png" /></figure><p><strong>retrywhen:</strong> retry when operator is used to call Http request after an previous http request throw an error</p><p><strong>startwith:</strong> startwith operator is used to initiate the stream with the starting value instead of concat and rest all based on input element event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*B2Oifs9iHg22kpMU.png" /></figure><h3>RxJs Throttling</h3><h3>Custom Debug RxJs Operator for Tap Rxjs Operator :</h3><p>This will log data based on levels. Code is to demonstrate how to create custom rxjs operator .</p><p>Its a higher order function which contains two functions where first function you will sending parameters what is needed and second function parameters contain source observble.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*otnCih2fCNp2_xl3.png" /></figure><p>Usage of Debug Rxjs Operator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*KwCGxz7CIYvf5wy7.png" /></figure><p><strong>RxJs ForkJoin operator</strong></p><p>forkjoin Rxjs operator is used to call parallel operations at a same time and receive the observables. Helpful in completing large running tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*gIsk8JFW0demER3D.png" /></figure><h3>Subjects and Stores</h3><p><strong>Notion of Subject :</strong></p><p>Subject is a combination of both Observable and observer which has all properties of emitting values and subscribing. It has no unsubscribe logic to our observable shared from subject.</p><p>Subject is a best way to create custom Observable and also to multicast</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*K9bLzau3ZO2X6gcP.png" /></figure><p><strong>Behavioral subject</strong></p><p>supports late subscription by emitting providing last value to the subscriber</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*c-ecwLAWovENZxam.png" /></figure><p><strong>Async Subject:</strong></p><p>Subject emits values after completion of subject. Async subject will emit last value when completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*K96mKXTbl5Pb2T-F.png" /></figure><p><strong>Replay Subject</strong></p><p>Subject emits complete values after subscription.</p><p>Hope this cheat sheet works I added almost every example I could add. this could help understanding most of the topics involved in RxJs.</p><p><em>Originally published at </em><a href="https://dev.to/abilashs003/rxjs-cheatsheet-15h9"><em>https://dev.to</em></a><em> on December 31, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a1ae72153b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-depth-angular/rxjs-cheat-sheet-9a1ae72153b4">Rxjs Cheat sheet</a> was originally published in <a href="https://medium.com/in-depth-angular">In-Depth Angular</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Bookmarks much needed]]></title>
            <link>https://medium.com/in-depth-angular/angular-bookmarks-much-needed-d35226a00746?source=rss----b5933c86ba74---4</link>
            <guid isPermaLink="false">https://medium.com/p/d35226a00746</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Abi Aradhya]]></dc:creator>
            <pubDate>Wed, 09 Dec 2020 06:30:10 GMT</pubDate>
            <atom:updated>2022-10-17T03:54:23.541Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jdrVZyoa432W8i5Cxi-fLQ.png" /></figure><h3>Angular architecture</h3><p><a href="https://medium.com/in-depth-angular/angular-architecture-ready-book-feccd2e5b19f">Angular architecture ready book</a></p><h3>Theming Angular Project</h3><p><a href="https://medium.com/@tomastrajan/the-complete-guide-to-angular-material-themes-4d165a9d24d1">The complete guide to Angular Material Themes</a></p><p><a href="https://indepth.dev/custom-theme-for-angular-material-components-series-part-1-create-a-theme/">https://indepth.dev/custom-theme-for-angular-material-components-series-part-1-create-a-theme/</a>](<a href="https://indepth.dev/custom-theme-for-angular-material-components-series-part-1-create-a-theme/">https://indepth.dev/custom-theme-for-angular-material-components-series-part-1-create-a-theme/</a></p><h3>Angular Static code analysis</h3><p><a href="http://mowede.com/blog/angular-devops-series-2/#:~:text=Static">Automating the Angular Application Development Process: Part 2 | MOWEDE Blog</a></p><h3>State management with ngrx</h3><p><a href="https://dzone.com/articles/angular-app-state-management-with-ngrx">Angular State Management with NgRx - DZone Web Dev</a></p><h3>Angular Cheat sheet</h3><p><a href="https://medium.com/javascript-in-plain-english/angular-cheat-sheet-cddd2f295b2c">Angular Cheat Sheet</a></p><h3>Angular Router explained</h3><p><a href="https://blog.angular-university.io/angular-2-router-nested-routes-and-nested-auxiliary-routes-build-a-menu-navigation-system/">Angular Router: A Complete Example (Bootstrap Navigation Menu)</a></p><h3>Angular CLI behind the scenes</h3><p><a href="https://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art074">Angular CLI Behind the Scenes - Part One</a></p><h3>Angular Forms</h3><p>Template driven forms</p><p><a href="https://blog.thoughtram.io/angular/2016/03/21/template-driven-forms-in-angular-2.html">Template-driven Forms in Angular</a></p><p>Custom validators</p><ul><li><a href="https://blog.thoughtram.io/angular/2016/03/14/custom-validators-in-angular-2.html">Custom Validators in Angular</a></li><li><a href="https://www.positronx.io/angular-8-express-file-upload-tutorial-with-reactive-forms/">Angular 8 &amp; Express File Upload Tutorial with Reactive Forms - positronX</a></li></ul><h3>Angular databinding</h3><p><a href="https://blog.bitsrc.io/data-binding-in-angular-cbc433481cec">Understanding Data Binding in Angular</a></p><h3>Angular with Firebase</h3><p><a href="https://blog.angular-university.io/angular-2-firebase/">Angular, Firebase and AngularFire Crash Course - Why Firebase ?</a></p><h3>Build your own observables — Angular 4 series</h3><p><a href="https://medium.com/angular-in-depth/learning-observables-part-1-arrays-14480816eb61">Build Your Own Observable Part 1: Arrays</a></p><h3>Angular 2 training book</h3><p><a href="https://angular-2-training-book.rangle.io/">Introduction</a></p><h3>Angular clean code</h3><p><a href="https://angular-2-training-book.rangle.io/">Introduction</a></p><h3>RXJS bookmarks</h3><p><a href="https://rxjs-dev.firebaseapp.com/">RxJS</a></p><p>Shareplay :</p><p><a href="https://2muchcoffee.com/blog/rxjs-welcome-on-board-upgraded-sharereplay-operator/">RxJS: Welcome on Board Upgraded ShareReplay Operator</a></p><h3>Angular CDK overlay</h3><p><a href="https://material.angular.io/cdk/overlay/overview">Angular Material</a></p><h3>Angular ng-Template, ng-container and ngTemplateoutlet</h3><p><a href="https://blog.angular-university.io/angular-ng-template-ng-container-ngtemplateoutlet/">Angular ng-template, ng-container and ngTemplateOutlet: Guided Tour</a></p><h3>Angular 300 questions covered</h3><p><a href="https://github.com/sudheerj/angular-interview-questions">sudheerj/angular-interview-questions</a></p><h3>Popular Angular experts Blog</h3><p>Netanel Basal</p><p>Tomas Trojan</p><p><a href="https://medium.com/@tomastrajan">Tomas Trajan — Medium</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d35226a00746" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-depth-angular/angular-bookmarks-much-needed-d35226a00746">Angular Bookmarks much needed</a> was originally published in <a href="https://medium.com/in-depth-angular">In-Depth Angular</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular architecture ready book]]></title>
            <link>https://medium.com/in-depth-angular/angular-architecture-ready-book-feccd2e5b19f?source=rss----b5933c86ba74---4</link>
            <guid isPermaLink="false">https://medium.com/p/feccd2e5b19f</guid>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Abi Aradhya]]></dc:creator>
            <pubDate>Wed, 09 Dec 2020 03:46:25 GMT</pubDate>
            <atom:updated>2022-10-17T03:56:04.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bGhTC0r-olc8_HFIT-Mrg.png" /></figure><p>In this article we are going to learn how to scaffold new angular application with clean and maintainable and extendable architecture in almost no time and what are the benefits of doing so, we will also discuss the most reusable services and feature specific components.</p><p>I am inspired by <a href="https://medium.com/@tomastrajan">Tomas Trajan</a> angular architecture blog. I am explaining same concepts with different examples and tools.</p><blockquote>From last year I am learning angular and have been developed more 9 to 10 applications. So with that understanding pitching in these concepts.</blockquote><blockquote><em>this article brings all lessons learned in a distilled cleanup form you to cut down your learning curve and help you guys create angular project epic.</em></blockquote><h3>Starting a project</h3><ul><li>Need Angular CLI, download it using npm</li></ul><pre><strong>npm install -g @angular/cli</strong></pre><blockquote>as of now(November 2020) the current angular version is 10.2.1and I would strongly recommend to create new apps using that version (or any latest versions) and start using goodies like IVY or — strict flag right from the beginning</blockquote><ul><li>“create-application false will create an empty workspace</li><li>“strict will adjust the values of some Typescript compiler flags to nudge us to do right things</li><li>IVY is a rendering engine for Angular which minifies the code into very minimal size.</li></ul><pre><strong>npm i -g @angular/cli@latest</strong></pre><p>First after installing angular cli, we have to generate fresh new Angular workspace and this can be achieved by running</p><pre><strong>ng new angular-arch --create-application false --strict</strong></pre><ul><li>angular-arch is project name</li><li>“create-application false will create an empty workspace</li><li>“strict will adjust the values of some Typescript compiler flags to nudge us to do right things</li><li>strict flag enabling initializes your project with few new settings that improve maintainability , help you catch bugs ahead of time, and allow the CLI to perform advanced optimizations on your application. Additionally, applications that use these stricter settings are easier to statically analyze, which can help the ng update command refactor code more safely and precisely when you are updating to future versions of Angular.</li></ul><p>As a coding enthusiast, always try to update angular to the latest version by running below command on your timeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/0*r5lpZ8Gz8yk0zsvp.png" /></figure><p>to see available schematics type ng g</p><h3>Application</h3><p>In the list of available schematics contains one called application and we will use it to create our first application in the workspace by running</p><pre><strong>ng g application my-ang-arch --prefix my-ang --style scss --routing</strong></pre><ul><li>my-ang-arch will be created in the projects folder. It will have angular router and will be using Sass styles ( with .scss file extension)</li><li>“prefix will be used in the name of every component tag and directive selector so we will get my-ang in every component as a selector.</li></ul><pre><strong>ng add @angular/material</strong></pre><p>For styling we will use Angular material which comes with simple and elegant components!</p><p>To add <a href="https://material.angular.io/">Angular Material</a> run following command using angular cli</p><p>This will install lib using npm and we will be prompted about couple of initial options</p><ul><li>select any default themes or if you want to customize select custom as an option later style with own theme in style.scss like <a href="https://material.angular.io/guide/theming">this.</a></li><li>install typography</li></ul><p>Once finished we can start importing Angular material components in our app but more on that later.</p><h3>The Tooling</h3><ul><li><a href="https://prettier.io/"><strong>Prettier</strong></a> : An opinionated code formatter which integrates with most of the IDE. We can even format whole project with the help of short npm script!</li></ul><p>Lets add it using</p><pre><strong>npm i -D prettier</strong></pre><p>Once installed, we can create .prettierrc file which allows to customize copule of formatting options as specified <a href="https://prettier.io/docs/en/configuration.html">here.</a> Sample configuration as shown below</p><pre><strong>{<br>&quot;singleQuote&quot; : true<br>}</strong></pre><p>For Angular, we can make prettier play nicely with tslint which is provided by AngularCLI,</p><p>to do that we can install tslint-config-prettier and add it in last item in the extends array filed in tslint.json file.</p><pre><strong>{<br>&quot;extends&quot; : [&quot;tslint:recommended&quot;, &quot;tslint-config-prettier&quot;]<br>}</strong></pre><p>we can add npm script to package.json just to run the command to format code before checkin</p><p>add this piece of commands scripts section of package.json</p><pre><strong>&quot;format:write&quot; : &quot;prettier \&quot;projects/**/*.{ts,html,md,scss,json}\&quot; --write&quot;</strong></pre><ul><li><a href="https://www.npmjs.com/package/webpack-bundle-analyzer"><strong>webpack-bundle-analyzer</strong></a><strong> </strong>: It can help us understand content of the bundle size produced during the prod build helpful for debugging correct structure and hence architecture of our app.</li></ul><p>Install webpack-bundle-analyzer by running command</p><pre><strong>npm i -D webpack-bundle-analyzer</strong></pre><p>once installed add following script in package.json in scripts section</p><pre><strong>&quot;analyze&quot; : &quot;ng build --prod --stats-json &amp;&amp; webpack-bundle-analyzer ./dist/&lt;app-name&gt;/stats.json&quot;</strong></pre><p>Script do the following things</p><ul><li>builds application for production as we are using — prod flag</li><li>collects statistics of all the modules by build because we are using stats-json flag</li><li>last step will call webpack bundle analyzer and specify the stats.json file.</li></ul><p>&amp;&amp; operator wont work in windows just create two commands in script by dividing them</p><pre><strong>&quot;analyze&quot; : &quot;ng build --prod --stats-json&quot; &quot;analyze:webpack&quot;: &quot;webpack-bundle-analyzer ./dist/&lt;app-name&gt;/stats.json&quot;</strong></pre><p>running both npm commands will open a new page which will show the amount of surface covered by each module.</p><ul><li><a href="https://compodoc.app/"><strong>Compodoc</strong> :</a> Static documentation tool for angular application which generates angular documentation in seconds by parsing all the components , services and pipes etc.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*h3CAohDCd19GMjCi.png" /></figure><p>Install Compodoc using command globally</p><pre><strong>npm install -g @compodoc/compodoc</strong></pre><p>define a script task in your package.json</p><pre><strong>&quot;compodoc&quot;: &quot;npx compodoc -p tsconfig.json src&quot;</strong></pre><p>and run it</p><pre><strong>npm run compodoc</strong></pre><h3>Start the application</h3><p>Run application using command</p><pre><strong>npm start</strong></pre><p>or</p><pre><strong>ng serve -o</strong></pre><p>If everything went well then application must be running in <a href="http://localhost:4200/">http://localhost:4200</a></p><p>Cool our initial setup is done. We have a workspace with empty Angular application and we have added some cool tooling to improve our developer experience!</p><p>The Architecture</p><p>Before generating and writing code lets sit back and see bigger picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kHdkAyIjEMBPapAj3mQ4Dg.png" /></figure><p>Lets organize code this way based on the functionality we implement.</p><p>We have two parts above :</p><p><strong>Eager part</strong> which will be loaded from start(the main.js bundle).It will contain the AppModule with top-level routes and CoreModule with basic layout like navbar/main layout and all the core singleton services which will be used through out the application.</p><p><strong>Lazy loaded</strong> part which will be loaded as a result of user navigation to these features. The lazy modules will also import shared module. Shared module consists of reusable components directives, pipes by all lazy modules hence which makes it a smaller bundle size and reasonable developer experience!</p><blockquote><em>Great our architecture structure is finished ,now we can organize our code and start adding features based on functionality</em></blockquote><h3>Summary</h3><p>We have created our angular application with extensible architecture in a very short time!</p><ul><li>While creating application we added — strict flag to maintain strict null checks, strict function types, restricting any type and strict property initialization</li><li>We added necessary tools to format code(prettier), to check bundle size(webpack-bundle-analyzer) and for documentation(Compodoc)</li><li>We saw angular architecture modules on what needs to be created at what place</li><li>Core Module : will be the base of whole project which consists of base layout or nav bar and core singleton services</li><li>Share Module : consists of reusable components, pipes ,directives that will be used by lazy features.</li><li>Lazy Module :Lazy module will implement the feature business logic (services) and views(components) that are specific to features</li></ul><p>Please support this article and developer with your claps and sharing because it helps to spread wider audience. Follow me on medium and also other blogs to get updated on tech stuff.</p><ul><li><a href="https://medium.com/in-depth-angular">In-Depth Angular</a></li><li><a href="https://dev.to/abilashs003">abi - DEV Profile</a></li><li><a href="https://codewithabi.hashnode.dev/">CodeWithAbi</a></li></ul><p>Other than technical stuff follow me on instagram</p><p><a href="https://www.instagram.com/abi_aradhya/">https://www.instagram.com/abi_aradhya/</a></p><p>Till the next article ba bye!!!</p><p><em>Originally published at </em><a href="https://dev.to/abilashs003/angular-architecture-ready-book-4j1e"><em>https://dev.to</em></a><em> on December 8, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=feccd2e5b19f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-depth-angular/angular-architecture-ready-book-feccd2e5b19f">Angular architecture ready book</a> was originally published in <a href="https://medium.com/in-depth-angular">In-Depth Angular</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Basic understanding and features -Part 1]]></title>
            <link>https://medium.com/in-depth-angular/angular-basic-understanding-and-features-part-1-9e0ce40b89e7?source=rss----b5933c86ba74---4</link>
            <guid isPermaLink="false">https://medium.com/p/9e0ce40b89e7</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Abi Aradhya]]></dc:creator>
            <pubDate>Tue, 08 Dec 2020 14:20:28 GMT</pubDate>
            <atom:updated>2022-10-17T03:56:46.382Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jreDhhLS-GFkjlyec_nECw.png" /></figure><p>This series of Angular in depth will cover all the following features part by part :</p><ul><li>Basic Understanding of Angular and features</li><li>Custom components with @Component</li><li>Components @Input and @Output, event Emitters</li><li>ngFor</li><li>ngIf</li><li>ngClass</li><li>ngStyle</li><li>ngSwitch</li><li>Built-In Pipes</li><li>Async Pipe</li><li>Custom Pipes</li><li>@Injectable and Custom Services</li><li>HTTP Client — GET POST PUT DELETE</li></ul><p>This article concentrates on key features of Angular and basics setup to start with any application.</p><p>We will build an example application throughout the whole series and understanding all core features</p><h3>Basic Understanding of Angular and features</h3><h3>Things required to start Angular development</h3><ul><li>Understanding on HTML, CSS, Typescript</li><li>Node installed in system</li></ul><p><a href="https://nodejs.org/en/download/">Node.js - Download Node.js®</a></p><ul><li>install angular cli to scaffold application</li></ul><pre>npm install -g @angular/cli</pre><h3>Take a tour of the example application</h3><p>Lets take a tour on example application “Crazy developers” together by exploring all Angular topics one by one</p><h3>Create new Angular application using Angular CLI</h3><pre>ng new crazydevelopersapp</pre><ul><li><em>ng :</em> referring to angular CLI</li><li><em>new :</em> is the keyword to create new angular application</li><li><em>crazydevelopersapp :</em> application name</li></ul><p>If project needs to be created in existing folder</p><pre>ng new *crazydevelopersapp* --directory ./</pre><p>CLI asks to enable routing choose yes and choose SCSS for stylesheets. folder structure after scaffolding the template looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/0*krqPTieZbmeUr1N3.png" /></figure><h3>Okay now Why Angular ?</h3><p><strong>we will see main features of Angular Core with an example</strong></p><ul><li><strong>custom HTML content</strong>: You can create your own custom HTML content and extend application functionality.</li></ul><p><strong>app-root</strong> is the custom HTML Tag for app component html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/0*mMYHAQ8eECTC-v21.png" /></figure><ul><li>separating data or the model of the application from view template</li><li>below example shows title in html tag is a variable consists of string “crazydeveloper” in component.ts</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*q-LPMRmhdAO78pow.png" /></figure><ul><li>component based architecture co ordinates between view and data</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/0*eVHMhAnDWugCpdgA.png" /></figure><ul><li>built in change detection mechanism which is completely transparent which synchronizes with view</li><li>Updating of data in secure way</li></ul><p>We will discuss on components, @Input, @Output and Event emitter in our next article.</p><p>For latest news on Angular core and other technical articles. follow me on</p><ul><li><a href="https://medium.com/in-depth-angular">In-Depth Angular</a></li><li><a href="https://codewithabi.hashnode.dev/">CodeWithAbi</a></li><li><a href="https://dev.to/abilashs003">abi - DEV Profile</a></li></ul><p>Other than technical follow me on instagram</p><p><a href="https://www.instagram.com/abi_aradhya/">https://www.instagram.com/abi_aradhya/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e0ce40b89e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/in-depth-angular/angular-basic-understanding-and-features-part-1-9e0ce40b89e7">Angular Basic understanding and features -Part 1</a> was originally published in <a href="https://medium.com/in-depth-angular">In-Depth Angular</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>