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

<channel>
	<title>angularcore - Bipon's Diary</title>
	<atom:link href="https://biponnotes.iglyphic.com/tag/angularcore/feed/" rel="self" type="application/rss+xml" />
	<link>https://biponnotes.iglyphic.com</link>
	<description>Do good for others. It will come back in unexpected ways.</description>
	<lastBuildDate>Wed, 19 Feb 2020 16:23:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.10</generator>
<site xmlns="com-wordpress:feed-additions:1">168324471</site>	<item>
		<title>Creating your first service in Angular</title>
		<link>https://biponnotes.iglyphic.com/creating-your-first-service-in-angular/</link>
					<comments>https://biponnotes.iglyphic.com/creating-your-first-service-in-angular/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Sat, 28 Dec 2019 22:57:13 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[Service]]></category>
		<guid isPermaLink="false">https://bipon.me/?p=264</guid>

					<description><![CDATA[<p>At first creating event.service.ts file into app/events/shared event.service.ts file import service file in app.module file Import service file and inject into event-list.component.ts event-thumbnail.component.ts file</p>
<p>The post <a href="https://biponnotes.iglyphic.com/creating-your-first-service-in-angular/">Creating your first service in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>At first creating event.service.ts file into app/events/shared</p>



<p>event.service.ts file</p>



<pre class="wp-block-code"><code>import { Injectable } from '@angular/core';

@Injectable()
export class EventService{
    getEvents(){
        return EVENTS;
    }
}

const EVENTS = [
    {
      id: 1,
      name: 'Angular Connect',
      date: '9/26/2036',
      time: '10:00 am',
      price: 599.99,
      imageUrl: '/assets/images/angularconnect-shield.png',
      onlineUrl: 'http://google.com',
      sessions: [
        {
          id: 1,
          name: "Using Angular 4 Pipes",
          presenter: "Peter Bacon Darwin",
          duration: 1,
          level: "Intermediate",
          abstract: `Learn all about the new pipes in Angular 4, both 
          how to write them, and how to get the new AI CLI to write 
          them for you. Given by the famous PBD, president of Angular 
          University (formerly Oxford University)`,
          voters: ['bradgreen', 'igorminar', 'martinfowler']
        },
        {
          id: 2,
          name: "Getting the most out of your dev team",
          presenter: "Jeff Cross",
          duration: 1,
          level: "Intermediate",
          abstract: `We all know that our dev teams work hard, but with 
          the right management they can be even more productive, without 
          overworking them. In this session I'll show you how to get the 
          best results from the talent you already have on staff.`,
          voters: ['johnpapa', 'bradgreen', 'igorminar', 'martinfowler']
        },
        {
          id: 3,
          name: "Angular 4 Performance Metrics",
          presenter: "Rob Wormald",
          duration: 2,
          level: "Advanced",
          abstract: `Angular 4 Performance is hot. In this session, we'll see 
          how Angular gets such great performance by preloading data on 
          your users devices before they even hit your site using the 
          new predictive algorithms and thought reading software 
          built into Angular 4.`,
          voters: []
        },
        {
          id: 4,
          name: "Angular 5 Look Ahead",
          presenter: "Brad Green",
          duration: 2,
          level: "Advanced",
          abstract: `Even though Angular 5 is still 6 years away, we all want 
          to know all about it so that we can spend endless hours in meetings 
          debating if we should use Angular 4 or not. This talk will look at 
          Angular 6 even though no code has yet been written for it. We'll 
          look at what it might do, and how to convince your manager to 
          hold off on any new apps until it's released`,
          voters: []
        },
        {
          id: 5,
          name: "Basics of Angular 4",
          presenter: "John Papa",
          duration: 2,
          level: "Beginner",
          abstract: `It's time to learn the basics of Angular 4. This talk 
          will give you everything you need to know about Angular 4 to 
          get started with it today and be building UI's for your self 
          driving cars and butler-bots in no time.`,
          voters: ['bradgreen', 'igorminar']
        }
      ]
    },
    {
      id: 2,
      name: 'ng-nl',
      date: '4/15/2037',
      time: '9:00 am',
      price: 950.00,
      imageUrl: '/assets/images/ng-nl.png',
      onlineUrl: 'http://google.com',
      location: {
        address: 'The NG-NL Convention Center &amp; Scuba Shop',
        city: 'Amsterdam',
        country: 'Netherlands'
      },
      sessions: [
        {
          id: 1,
          name: "Testing Angular 4 Workshop",
          presenter: "Pascal Precht &amp; Christoph Bergdorf",
          duration: 4,
          level: "Beginner",
          abstract: `In this 6 hour workshop you will learn not only how to test Angular 4, 
          you will also learn how to make the most of your team's efforts. Other topics
          will be convincing your manager that testing is a good idea, and using the new
          protractor tool for end to end testing.`,
          voters: ['bradgreen', 'igorminar']
        },
        {
          id: 2,
          name: "Angular 4 and Firebase",
          presenter: "David East",
          duration: 3,
          level: "Intermediate",
          abstract: `In this workshop, David East will show you how to use Angular with the new
          ultra-real-time 5D Firebase back end, hosting platform, and wine recommendation engine.`,
          voters: ['bradgreen', 'igorminar', 'johnpapa']
        },
        {
          id: 3,
          name: "Reading the Angular 4 Source",
          presenter: "Patrick Stapleton",
          duration: 2,
          level: "Intermediate",
          abstract: `Angular 4's source code may be over 25 million lines of code, but it's really 
          a lot easier to read and understand then you may think. Patrick Stapleton will talk
          about his secretes for keeping up with the changes, and navigating around the code.`,
          voters: ['martinfowler']
        },
        {
          id: 4,
          name: "Hail to the Lukas",
          presenter: "Lukas Ruebbelke",
          duration: 1,
          level: "Beginner",
          abstract: `In this session, Lukas will present the 
          secret to being awesome, and how he became the President 
          of the United States through his amazing programming skills, 
          showing how you too can be success with just attitude.`, 
          voters: ['bradgreen']
        },
      ]
    },
    {
      id: 3,
      name: 'ng-conf 2037',
      date: '5/4/2037',
      time: '10:00 am',
      price: 759.00,
      imageUrl: '/assets/images/ng-conf.png',
      location: {
        address: 'The Palatial America Hotel',
        city: 'Salt Lake City',
        country: 'USA'
      },
      sessions: [
        {
          id: 1,
          name: "How Elm Powers Angular 4",
          presenter: "Murphy Randle",
          duration: 2,
          level: "Intermediate",
          abstract: `We all know that Angular is written in Elm, but did you
          know how the source code is really written? In this exciting look
          into the internals of Angular 4, we'll see exactly how Elm powers
          the framework, and what you can do to take advantage of this knowledge.`,
          voters: ['bradgreen', 'martinfowler', 'igorminar']
        },
        {
          id: 2,
          name: "Angular and React together",
          presenter: "Jamison Dance",
          duration: 2,
          level: "Intermediate",
          abstract: `React v449.6 has just been released. Let's see how to use 
          this new version with Angular to create even more impressive applications.`,
          voters: ['bradgreen', 'martinfowler']
        },
        {
          id: 3,
          name: "Redux Woes",
          presenter: "Rob Wormald",
          duration: 1,
          level: "Intermediate",
          abstract: `Everyone is using Redux for everything from Angular to React to 
          Excel macros, but you're still having trouble grasping it? We'll take a look
          at how farmers use Redux when harvesting grain as a great introduction to 
          this game changing technology.`,
          voters: ['bradgreen', 'martinfowler', 'johnpapa']
        },
        {
          id: 4,
          name: "ng-wat again!!",
          presenter: "Shai Reznik",
          duration: 1,
          level: "Beginner",
          abstract: `Let's take a look at some of the stranger pieces of Angular 4,
          including neural net nets, Android in Androids, and using pipes with actual pipes.`,
          voters: ['bradgreen', 'martinfowler', 'igorminar', 'johnpapa']
        },
        {
          id: 5,
          name: "Dressed for Success",
          presenter: "Ward Bell",
          duration: 2,
          level: "Beginner",
          abstract: `Being a developer in 2037 is about more than just writing bug-free code. 
          You also have to look the part. In this amazing expose, Ward will talk you through
          how to pick out the right clothes to make your coworkers and boss not only
          respect you, but also want to be your buddy.`,
          voters: ['bradgreen', 'martinfowler']
        },
        {
          id: 6,
          name: "These aren't the directives you're looking for",
          presenter: "John Papa",
          duration: 2,
          level: "Intermediate",
          abstract: `Coinciding with the release of Star Wars Episode 18, this talk will show how
          to use directives in your Angular 4 development while drawing lessons from the new movie,
          featuring all your favorite characters like Han Solo's ghost and Darth Jar Jar.`,
          voters: ['bradgreen', 'martinfowler']
        },
      ]
    },
    {
      id: 4,
      name: 'UN Angular Summit',
      date: '6/10/2037',
      time: '8:00 am',
      price: 800.00,
      imageUrl: '/assets/images/basic-shield.png',
      location: {
        address: 'The UN Angular Center',
        city: 'New York',
        country: 'USA'
      },
      sessions: [
        {
          id: 1,
          name: "Diversity in Tech",
          presenter: "Sir Dave Smith",
          duration: 2,
          level: "Beginner",
          abstract: `Yes, we all work with cyborgs and androids and Martians, but 
          we probably don't realize that sometimes our internal biases can make it difficult for
          these well-designed coworkers to really feel at home coding alongside us. This talk will
          look at things we can do to recognize our biases and counteract them.`,
          voters: ['bradgreen', 'igorminar']
        },
        {
          id: 2,
          name: "World Peace and Angular",
          presenter: "US Secretary of State Zach Galifianakis",
          duration: 2,
          level: "Beginner",
          abstract: `Angular has been used in most of the major peace brokering that has
          happened in the last decade, but there is still much we can do to remove all
          war from the world, and Angular will be a key part of that effort.`,
          voters: ['bradgreen', 'igorminar', 'johnpapa']
        },
        {
          id: 3,
          name: "Using Angular with Androids",
          presenter: "Dan Wahlin",
          duration: 3,
          level: "Advanced",
          abstract: `Androids may do everything for us now, allowing us to spend all day playing 
          the latest Destiny DLC, but we can still improve the massages they give and the handmade
          brie they make using Angular 4. This session will show you how.`,
          voters: ['igorminar', 'johnpapa']
        },
      ]
    },
    {
      id: 5,
      name: 'ng-vegas',
      date: '2/10/2037',
      time: '9:00 am',
      price: 400.00,
      imageUrl: '/assets/images/ng-vegas.png',
      location: {
        address: 'The Excalibur',
        city: 'Las Vegas',
        country: 'USA'
      },
      sessions: [
        {
          id: 1,
          name: "Gambling with Angular",
          presenter: "John Papa",
          duration: 1,
          level: "Intermediate",
          abstract: `No, this talk isn't about slot machines. We all know that 
          Angular is used in most waiter-bots and coke vending machines, but
          did you know that was also used to write the core engine in the majority
          of voting machines? This talk will look at how all presidential elections
          are now determined by Angular code.`,
          voters: ['bradgreen', 'igorminar']
        },
        {
          id: 2,
          name: "Angular 4 in 60ish Minutes",
          presenter: "Dan Wahlin",
          duration: 2,
          level: "Beginner",
          abstract: `Get the skinny on Angular 4 for anyone new to this great new technology.
          Dan Wahlin will show you how you can get started with Angular in 60ish minutes, 
          guaranteed!`,
          voters: ['bradgreen', 'igorminar', 'johnpapa']
        }
      ]
    }
  ]</code></pre>



<p>import service file in app.module file</p>



<pre class="wp-block-code"><code>import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { EventsAppComponent } from './events-app.component';
import { EventListComponent } from './events/event-list.component';
import { EventThumbnailComponent } from './events/event-thumbnail.component';
import { NavBarComponent } from './nav/navbar-component';
import { EventService } from './events/shared/event.service';

@NgModule({
  declarations: [
    EventsAppComponent,
    EventListComponent,
    EventThumbnailComponent,
    NavBarComponent
  ],
  imports: [
    BrowserModule
  ],
  providers: [EventService],
  bootstrap: [EventsAppComponent]
})
export class AppModule { }</code></pre>



<p>Import service file and inject  into  event-list.component.ts </p>



<pre class="wp-block-code"><code>import { EventService } from './shared/event.service';
import { Component, OnInit } from '@angular/core';

@Component({
    selector: "events-list",
    template: `
    &lt;div>
    &lt;h2>Upcoming Angular Evnets&lt;/h2>
        &lt;hr>
        &lt;div class="row">
            &lt;div class="col-md-5" *ngFor="let event of events">
                &lt;event-thumbnail  [event]="event">&lt;/event-thumbnail>
            &lt;/div>
        &lt;/div>
    &lt;/div>
    `
})


export class EventListComponent implements OnInit{

    events: any[];

    constructor(private eventService: EventService){
        
    }

    ngOnInit(){
        this.events = this.eventService.getEvents();
    }

}</code></pre>



<figure class="wp-block-image"><img width="690" height="260" src="https://i1.wp.com/bipon.me/wp-content/uploads/2019/12/creating-service.png?resize=690%2C260&#038;ssl=1" alt="" class="wp-image-265" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/12/creating-service.png?w=690&amp;ssl=1 690w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/12/creating-service.png?resize=300%2C113&amp;ssl=1 300w" sizes="(max-width: 690px) 100vw, 690px" data-recalc-dims="1" /></figure>



<p>event-thumbnail.component.ts file</p>



<pre class="wp-block-code"><code>import { Component, Input, Output, EventEmitter } from '@angular/core';

@Component({
    selector: 'event-thumbnail',
    template: `        
        &lt;div class="well thumbnail">
            &lt;h2>{{event?.name}}&lt;/h2>
            &lt;div>Date: {{event?.date}}&lt;/div>
            &lt;div [ngStyle]="getStartTimeStyle()" 
            [ngSwitch]="event?.time">
                Time: {{event?.time}}
                &lt;span *ngSwitchCase="'8:00 am'">(Early Start)&lt;/span>
                &lt;span *ngSwitchCase="'10:00 am'">(Late Start)&lt;/span>
                &lt;span *ngSwitchDefault>(Normal Start)&lt;/span>
            &lt;/div>
            &lt;div>price: \${{event?.price}}&lt;/div>
            &lt;!-- &lt;div>time: {{event?.time}}&lt;/div> -->
            &lt;div *ngIf="event?.location">
                &lt;span>Location: {{event?.location?.address}}&lt;/span>
                &lt;span>&nbsp;&lt;/span>
                &lt;span>{{event?.location?.city}}, {{event?.location?.country}}&lt;/span>
            &lt;/div>
            &lt;div *ngIf="event?.onlineUrl">
                Online Url: {{event?.onlineUrl}}
            &lt;/div>
            
        &lt;/div>

    `,
    styles : [`
        .green{color: green !important}
        .bold{font-weight: bold;}
        .thumbnail{min-height: 210px;}
    `]
})

export class EventThumbnailComponent{
    @Input() event: any;

    getStartTimeStyle():any{
        if(this.event &amp;&amp; this.event.time === '8:00 am')
            return {color: '#003300', 'font-weight': 'bold'}
        return {}
    }
}</code></pre><p>The post <a href="https://biponnotes.iglyphic.com/creating-your-first-service-in-angular/">Creating your first service in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/creating-your-first-service-in-angular/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">264</post-id>	</item>
		<item>
		<title>HTTP access using HttpClient in Angular</title>
		<link>https://biponnotes.iglyphic.com/http-access-using-httpclient-in-angular/</link>
					<comments>https://biponnotes.iglyphic.com/http-access-using-httpclient-in-angular/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Thu, 12 Dec 2019 07:08:28 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<guid isPermaLink="false">https://bipon.me/?p=178</guid>

					<description><![CDATA[<p>Step 1: app.module.ts file Step 2: data.service.ts file</p>
<p>The post <a href="https://biponnotes.iglyphic.com/http-access-using-httpclient-in-angular/">HTTP access using HttpClient in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Step 1</strong>:  app.module.ts file</p>



<pre class="wp-block-code"><code>import { HttpClientModule } from '@angular/common/http'  
imports: [
    HttpClientModule,
  ],
</code></pre>



<p><strong>Step 2:</strong> data.service.ts file</p>



<pre class="wp-block-code"><code>import { Observable, of } from 'rxjs';
import { HttpClient } from '@angular/common/http';

constructor(private http: HttpClient) { }

  postUserSettingsForm(userSettings: UserSettings): Observable&lt;any>{
    return this.http.post('url', userSettings)
  }</code></pre><p>The post <a href="https://biponnotes.iglyphic.com/http-access-using-httpclient-in-angular/">HTTP access using HttpClient in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/http-access-using-httpclient-in-angular/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">178</post-id>	</item>
		<item>
		<title>Retrieving data for Select elements</title>
		<link>https://biponnotes.iglyphic.com/retrieving-data-for-select-elements/</link>
					<comments>https://biponnotes.iglyphic.com/retrieving-data-for-select-elements/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Thu, 12 Dec 2019 06:28:50 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[Service]]></category>
		<guid isPermaLink="false">https://bipon.me/?p=176</guid>

					<description><![CDATA[<p>Step 1: user-settings-form.component.ts file Step 2: data.service.ts file Step 3: user-settings-form.component.html file</p>
<p>The post <a href="https://biponnotes.iglyphic.com/retrieving-data-for-select-elements/">Retrieving data for Select elements</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Step 1</strong>: user-settings-form.component.ts file</p>



<pre class="wp-block-code"><code>import { Observable } from 'rxjs';

//subscriptionTypes = ['one', 'two', 'three']
subscriptionTypes$: Observable&lt;string[]>

 ngOnInit() {
    this.subscriptionTypes$ = this.dataService.getSubscriptionTypes();
  }
</code></pre>



<p><strong>Step 2:</strong> data.service.ts file</p>



<pre class="wp-block-code"><code>import { Observable, of } from 'rxjs';

 getSubscriptionTypes(): Observable&lt;string[]>{
    return of(['Monthly', 'Annual', 'Lifetime']);
  }
</code></pre>



<p><strong>Step 3:</strong> user-settings-form.component.html file</p>



<pre class="wp-block-code"><code>&lt;div class="form-group">
        &lt;label for="subscriptionType">Subscription Type&lt;/label>
        &lt;select class="form-control" id="subscriptionType" 
           name="subscriptionType" [(ngModel)]="userSettings.subscriptionType">
                &lt;option *ngFor="let type of subscriptionTypes$ | async">
                        {{type}}
                &lt;/option>
        &lt;/select>
    &lt;/div>
</code></pre><p>The post <a href="https://biponnotes.iglyphic.com/retrieving-data-for-select-elements/">Retrieving data for Select elements</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/retrieving-data-for-select-elements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">176</post-id>	</item>
		<item>
		<title>Creating a Service in Angular</title>
		<link>https://biponnotes.iglyphic.com/creating-a-service-in-angular/</link>
					<comments>https://biponnotes.iglyphic.com/creating-a-service-in-angular/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Thu, 12 Dec 2019 04:44:23 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[Service]]></category>
		<guid isPermaLink="false">https://bipon.me/?p=170</guid>

					<description><![CDATA[<p>Step 1: create a data-service.ts file in data folder Note: ng command &#8211; ng g s data import user-settings file Step 2: in user-settings-form.component.ts file import bellow those two files Step 3: in user-settings-form.component.html file {{userSettings &#124; json}}</p>
<p>The post <a href="https://biponnotes.iglyphic.com/creating-a-service-in-angular/">Creating a Service in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Step 1</strong>: create a data-service.ts file in data folder<br> <strong>Note</strong>: ng command &#8211; ng g s data</p>



<p>import user-settings file</p>



<pre class="wp-block-code"><code>import { UserSettings } from './user-settings';
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class DataService {
  constructor() { }

  postUserSettingsForm(userSettings: UserSettings): Observable&lt;any>{  
    return of(userSettings);
  }
} 
</code></pre>



<p><strong>Step 2</strong>:  <br> in user-settings-form.component.ts file<br> import bellow those two files</p>



<pre class="wp-block-code"><code>import { DataService } from './../data/data.service';
import { UserSettings } from './../data/user-settings';

constructor(private dataService: DataService) { }
  onSubmit(form: NgForm){
    console.log('in onSubmmit: ', form.value);
       this.dataService.postUserSettingsForm(this.userSettings).subscribe(
         result => console.log('success: ', result),
         error => console.log('error: ', error)
       );
  }
</code></pre>



<p>Step 3: in user-settings-form.component.html file</p>



<pre class="wp-block-code"><code>&lt;form #form="ngForm" (ngSubmit)="onSubmit(form)">
    &lt;div class="form-group">
        &lt;label for="name">Name&lt;/label>
        &lt;input id="name" name="name" class="form-control" [(ngModel)]="userSettings.name" />
    &lt;/div>
&lt;/form></code></pre>



<p>{{userSettings | json}}</p><p>The post <a href="https://biponnotes.iglyphic.com/creating-a-service-in-angular/">Creating a Service in Angular</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/creating-a-service-in-angular/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">170</post-id>	</item>
		<item>
		<title>টাইপস্ক্রিপ্ট &#8211; টাইপ Annotation</title>
		<link>https://biponnotes.iglyphic.com/typescript-type-annotation/</link>
					<comments>https://biponnotes.iglyphic.com/typescript-type-annotation/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Mon, 30 Sep 2019 04:20:21 +0000</pubDate>
				<category><![CDATA[টাইপস্ক্রিপ্ট]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[typescript]]></category>
		<guid isPermaLink="false">http://bipon.me/?p=110</guid>

					<description><![CDATA[<p>টাইপস্ক্রিপ্ট &#8211; টাইপ Annotation টাইপস্ক্রিপ্ট, যেখানে আমরা ভেরিয়েবল, ফাংশন প্যারামিটার এবং অবজেক্টের বৈশিষ্ট্যগুলির ধরণ নির্দিষ্ট করতে পারি। আমরা :Type ব্যবহার করে প্রকারটি নির্দিষ্ট করতে পারি। যেমন &#8211; ভেরিয়েবল, প্যারামিটার বা প্রপার্টি নামের পরে। কোলন পরে একটি স্পেস হবে । টাইপস্ক্রিপ্টে জাভাস্ক্রিপ্টের সমস্ত প্রিমিটিভ টাইপ &#8211; সংখ্যা, স্ট্রিং এবং বুলিয়ান অন্তর্ভুক্ত। নিম্নলিখিত উদাহরণটি বিভিন্ন ডেটা প্রকারের&#8230;<a href="https://biponnotes.iglyphic.com/typescript-type-annotation/" class="more-link">Continue reading <span class="screen-reader-text">টাইপস্ক্রিপ্ট &#8211; টাইপ Annotation</span></a></p>
<p>The post <a href="https://biponnotes.iglyphic.com/typescript-type-annotation/">টাইপস্ক্রিপ্ট – টাইপ Annotation</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<h4><strong>টাইপস্ক্রিপ্ট &#8211; টাইপ Annotation</strong></h4>



<p>টাইপস্ক্রিপ্ট, যেখানে আমরা ভেরিয়েবল, ফাংশন প্যারামিটার এবং অবজেক্টের বৈশিষ্ট্যগুলির ধরণ নির্দিষ্ট করতে পারি।<br></p>



<p>আমরা :Type ব্যবহার করে প্রকারটি নির্দিষ্ট করতে পারি। যেমন &#8211; ভেরিয়েবল, প্যারামিটার বা প্রপার্টি নামের পরে। কোলন পরে একটি স্পেস হবে । টাইপস্ক্রিপ্টে জাভাস্ক্রিপ্টের সমস্ত প্রিমিটিভ টাইপ &#8211; সংখ্যা, স্ট্রিং এবং বুলিয়ান অন্তর্ভুক্ত।<br></p>



<p>নিম্নলিখিত উদাহরণটি বিভিন্ন ডেটা প্রকারের সাথে ভেরিয়েবল ঘোষণা করে:<br></p>



<p><strong>উদাহরণ: টাইপস্ক্রিপ্টে&nbsp; টাইপ Annotation এর প্রকারভেদ</strong>&nbsp;<br></p>



<p>var age: number = 32; // number variable</p>



<p>var name: string = &#8220;John&#8221;;// string variable</p>



<p>var isUpdated: boolean = true;// Boolean variable<br></p>



<p>উপরের উদাহরণে, প্রতিটি ভেরিয়েবল তাদের ডেটা টাইপ দিয়ে ঘোষণা করা হয়। এগুলি টাইপস্ক্রিপ্ট Annotation। কোনও ভেরিয়েবলের ঘোষিত ডেটা টাইপ ব্যতীত অন্য কোনও ডেটা টাইপ ব্যবহার করে আপনি মানটি পরিবর্তন করতে পারবেন না। আপনি যদি এটির চেষ্টা করে থাকেন তবে টাইপস্ক্রিপ্ট কম্পাইলার একটি এরর প্রদর্শন করবে। এটি জাভাস্ক্রিপ্ট এররগুলি ধরতে সহায়তা করে। উদাহরণস্বরূপ, যদি আপনি উপরের উদাহরণে কোনও বয়স বা নাম্বার এ একটি নাম নির্ধারণ করেন তবে এটি একটি এরর দেয়।<br></p>



<p>টাইপস্ক্রিপ্ট টাইপ Annotation চেকিং প্রয়োগ করতে ব্যবহৃত হয়। টাইপ স্ক্রিপ্টে টাইপ Annotation&nbsp; ব্যবহার করা বাধ্যতামূলক নয়। তবে টাইপস্ক্রিপ্ট Annotation টাইপ পরীক্ষা করতে কম্পাইলারকে সহায়তা করে এবং ডেটা টাইপ এর সাথে সম্পর্কিত এররগুলি এড়াতে সহায়তা করে। আপনার কোডে কাজ করা ভবিষ্যতের ডেভেলপারদের দ্বারা সহজে বুঝার জন্য খুব দরকার এটা ।&nbsp;<br></p>



<p>আমরা এখনও জাভাস্ক্রিপ্ট ভেরিয়েবল ঘোষণার পদ্ধতি অনুসরণ করতে পারি এবং টাইপস্ক্রিপ্ট কম্পাইলার ভেরিয়েবলের ডেটা টাইপ অনুমান করতে পারে।<br></p>



<p>উদাহরণ: টাইপ Annotation অফ প্যারামিটারস<br></p>



<p>function display(id:number, name:string)</p>



<p>{</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;console.log(&#8220;Id = &#8221; + id + &#8220;, Name = &#8221; + name);</p>



<p>}<br></p>



<p>একইভাবে, আমরা অবজেক্টের প্রতিটি বৈশিষ্ট্যের জন্য ইনলাইন টিকা সহ একটি অবজেক্ট ঘোষণা করতে পারি।</p>



<p>উদাহরণ: টাইপ Annotation ইন অবজেক্ট<br></p>



<p>var employee : {&nbsp;</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;id: number;&nbsp;</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;name: string;&nbsp;</p>



<p>};&nbsp;<br></p>



<p>employee = {&nbsp;</p>



<p>&nbsp;&nbsp;id: 100,&nbsp;</p>



<p>&nbsp;&nbsp;name : &#8220;John&#8221;</p>



<p>}<br></p>



<p>এখানে আমরা দুটি সংখ্যার আইডি এবং নাম সহ যথাক্রমে ডেটা টাইপ নম্বর এবং স্ট্রিং সহ একটি অবজেক্ট employee&nbsp; ঘোষণা করি।<br></p>



<p>আপনি যদি আইডিতে একটি স্ট্রিং মান নির্ধারণের চেষ্টা করেন তবে টাইপস্ক্রিপ্ট কম্পাইলার নিম্নলিখিত এররটি দেবে।<br></p>



<p>error TS2322: Type &#8216;{ id: string; name: string; }&#8217; is not assignable to type&nbsp;</p>



<p>&#8216;{ id:number; name: string; }&#8217;.Types of property &#8216;id&#8217; are incompatible.</p>



<p>Type &#8216;string&#8217; is not assignable to type &#8216;number&#8217;.<br></p><p>The post <a href="https://biponnotes.iglyphic.com/typescript-type-annotation/">টাইপস্ক্রিপ্ট – টাইপ Annotation</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/typescript-type-annotation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">110</post-id>	</item>
		<item>
		<title>অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে?</title>
		<link>https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/</link>
					<comments>https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Wed, 25 Sep 2019 11:43:13 +0000</pubDate>
				<category><![CDATA[অ্যাঙ্গুলার]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[Component]]></category>
		<guid isPermaLink="false">http://bipon.me/?p=89</guid>

					<description><![CDATA[<p>অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে? আমরা লেগো টুকরাগুলির মতো অ্যাংগুলার কম্পোনেন্টগুলির কথা ভাবতে পারি। আমরা একবারে একটি কম্পোনেন্ট তৈরি করি তবে সেগুলি আমাদের ওয়েবসাইটের বিভিন্ন অংশে একাধিকবার ব্যবহার করতে পারি। একটি অ্যাংগুলার&#160; অ্যাপ্লিকেশন একটি গাছের কাঠামো যা আমরা তৈরি সেই সমস্ত কম্পোনেন্টগুলিকে নিয়ে গঠিত, যেমন আমরা কীভাবে ছোট লেগো টুকরো থেকে লেগো&#8230;<a href="https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/" class="more-link">Continue reading <span class="screen-reader-text">অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে?</span></a></p>
<p>The post <a href="https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/">অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে?</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে?</strong><br></p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="682" src="https://i1.wp.com/bipon.me/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh-1024x682.jpg?resize=1024%2C682" alt="" class="wp-image-91" srcset="https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?resize=1024%2C682&amp;ssl=1 1024w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?resize=300%2C200&amp;ssl=1 300w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?resize=768%2C512&amp;ssl=1 768w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?resize=750%2C500&amp;ssl=1 750w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?w=2080&amp;ssl=1 2080w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/0_9czJWecyDtbxjwfh.jpg?w=3120&amp;ssl=1 3120w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure>



<p>আমরা লেগো টুকরাগুলির মতো অ্যাংগুলার কম্পোনেন্টগুলির কথা ভাবতে পারি। আমরা একবারে একটি কম্পোনেন্ট তৈরি করি তবে সেগুলি আমাদের ওয়েবসাইটের বিভিন্ন অংশে একাধিকবার ব্যবহার করতে পারি।<br></p>



<p>একটি অ্যাংগুলার&nbsp; অ্যাপ্লিকেশন একটি গাছের কাঠামো যা আমরা তৈরি সেই সমস্ত কম্পোনেন্টগুলিকে নিয়ে গঠিত, যেমন আমরা কীভাবে ছোট লেগো টুকরো থেকে লেগো স্ট্রাকচার তৈরি করি।<br></p>



<p>কম্পোনেন্ট গুলিএকটি অ্যাংগুলার অ্যাপ্লিকেশনটির সর্বাধিক প্রাথমিক ইউআই(UI) বিল্ডিং ব্লক। একটি অ্যাংগুলার অ্যাপ্লিকেশনটিতে অ্যাংগুলার কম্পোনেন্টগুলির একটি গাছ থাকে — <strong>অ্যাংগুলার&nbsp; অফিসিয়াল ডক্স</strong><br></p>



<figure class="wp-block-image"><img loading="lazy" width="573" height="385" src="https://i0.wp.com/bipon.me/wp-content/uploads/2019/09/1_5jyMW3yzXfoR2fb06CXu-Q.png?resize=573%2C385" alt="" class="wp-image-92" srcset="https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_5jyMW3yzXfoR2fb06CXu-Q.png?w=573&amp;ssl=1 573w, https://i1.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_5jyMW3yzXfoR2fb06CXu-Q.png?resize=300%2C202&amp;ssl=1 300w" sizes="(max-width: 573px) 100vw, 573px" data-recalc-dims="1" /></figure>



<p>সুতরাং এটি মূলত একটি অ্যাংগুলার কম্পোনেন্ট যা, কিন্তু এটি সমস্ত নয়। এই আর্টিকেলে, আপনি নিম্নলিখিত প্রশ্নের উত্তর পাবেন:<br></p>



<ul><li>একটি কম্পোনেন্টের কাজগুলি কী কী?</li><li>একটি কম্পোনেন্টের ভিতরে কি?</li><li>কোন কম্পোনেন্ট কীভাবে কাজ করে?</li><li>এনজিওনিট (ngOnInit?) কী?</li></ul>



<p><strong>একটি কম্পোনেন্টের কাজগুলি</strong><br></p>



<p>কোন কম্পোনেন্টের প্রধান কাজগুলি হ&#8217;ল:<br></p>



<ul><li>ইন্টারপোলেশন (Interpolation), দিকনির্দেশক(Directives) এবং পাইপের(Pipes) সহায়তায় একটি নির্দিষ্ট পেজ / বিভাগ এবং এর ডেটা প্রদর্শন করা হচ্ছে</li><li>মডেল এবং ভিউগুলির মধ্যে বাইন্ডিং ডেটা</li></ul>



<p><strong>একটি কম্পোনেন্টের ভিতরে কি?</strong><br></p>



<p>একটি কম্পোনেন্টে<strong> </strong>রয়েছে (বেশিরভাগ) 3 টি অংশ:</p>



<ul><li>টেমপ্লেট ফাইল- এইচটিএমএল ভিউ</li><li>টাইপস্ক্রিপ্ট ফাইল &#8211; মডেল</li><li>স্টাইল ফাইল &#8211; সিএসএস</li></ul>



<figure class="wp-block-image"><img loading="lazy" width="630" height="386" src="https://i0.wp.com/bipon.me/wp-content/uploads/2019/09/1_DcbCqgIylij6c6mnwdvr9g.png?resize=630%2C386" alt="" class="wp-image-93" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_DcbCqgIylij6c6mnwdvr9g.png?w=630&amp;ssl=1 630w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_DcbCqgIylij6c6mnwdvr9g.png?resize=300%2C184&amp;ssl=1 300w" sizes="(max-width: 630px) 100vw, 630px" data-recalc-dims="1" /></figure>



<p>ফোল্ডার (অ্যাপ) হ&#8217;ল আমাদের কম্পোনেন্ট<strong> </strong>ফোল্ডার, এতে এইচটিএমএল, সিএসএস এবং টিএস ফাইল রয়েছে।&nbsp; spec.ts পরীক্ষার জন্য এবং আপনি আপাতত module.ts উপেক্ষা করতে পারবেন।<br></p>



<p>সুতরাং প্রতিটি কম্পোনেন্টর<strong> </strong>নিজস্ব HTML কাঠামো, স্টাইল (সিএসএস) এবং ফাঙ্কশনালিটি (TS) আছে। কিন্তু কোন কম্পোনেন্ট<strong> </strong>আসলে কীভাবে কাজ করে?<br></p>



<p>একটি অ্যাংগুলার অ্যাপ তৈরি করার সময় আমাদের ফোল্ডারগুলির সাবধানতার সাথে নাম দেওয়া উচিত, অন্যথায়, আমরা একটি বড় প্রজেক্টর ভিতরে হারিয়ে যাব।</p>



<p><strong>কোন কম্পোনেন্ট কীভাবে কাজ করে?</strong><br></p>



<p>ঠিক আছে, উত্তরটি app.componal.ts এর ভিতরে রয়েছে:</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="462" src="https://i0.wp.com/bipon.me/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA-1024x462.png?resize=1024%2C462" alt="" class="wp-image-94" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA.png?resize=1024%2C462&amp;ssl=1 1024w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA.png?resize=300%2C135&amp;ssl=1 300w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA.png?resize=768%2C346&amp;ssl=1 768w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA.png?resize=750%2C338&amp;ssl=1 750w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_nqgu6lBwQ4Ae3ePpRJryQA.png?w=1340&amp;ssl=1 1340w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure>



<p>আমাদের এখানে একটি সাধারণ টাইপস্ক্রিপ্ট ক্লাস রয়েছে। তবে এটি একটি কম্পোনেন্ট<strong> </strong>হিসাবে ব্যবহার করার জন্য:<br></p>



<p>প্রথমত, আমরা @angular/core লাইব্রেরি থেকে কম্পোনেন্টটি ইম্পোর্ট করি, যাতে আমরা একটি অ্যাংগুলার&nbsp; কম্পোনেন্ট তৈরি করতে পারি<br></p>



<p>@Component decorator টিএস ক্লাসটিকে একটি কম্পোনেন্ট হিসাবে চিহ্নিত করে এবং আমাদের নীচের মেটাডেটা যুক্ত করতে দেয়<br></p>



<p>selector হ&#8217;ল এইচটিএমএল ট্যাগ হিসাবে প্রজেক্টর অন্যান্য এইচটিএমএল ফাইলের অভ্যন্তরটিকে কল করার জন্য: &lt;app-root&gt; &lt;/app-root&gt;<br></p>



<p><strong>TemplateUrl </strong>&nbsp;যেখানে কম্পোনেন্টটির এইচটিএমএল ভিউ রয়েছে।<br></p>



<p><strong>style URLs</strong> (1 টির বেশি হতে পারে) যেখানে কম্পোনেন্টটির স্টাইল সিএসএস থাকে।<br></p>



<p>অবশেষে, আমরা ক্লাসটি (কম্পোনেন্ট) এক্সপোর্ট করি যাতে আমরা এটিকে app.module অ্যাপ্লিকেশনটির মধ্যে কল করতে পারি অথবা প্রোজেক্টর অন্য কোন জাইগাতে ব্যবহার করতে পারি ।&nbsp;&nbsp;<br></p>



<p>সুতরাং এই পদক্ষেপগুলি একটি অ্যাংগুলার&nbsp; কম্পোনেন্ট তৈরি করে। এখন দেখা যাক কীভাবে এটি ব্যবহার করবেন…<br></p>



<p>উপাদান তৈরি করার পরে, আমাদের অবশ্যই এটি declarations এর অধীনে App Module মধ্যে সংরক্ষণ করতে হবে:</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="664" src="https://i1.wp.com/bipon.me/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ-1024x664.png?resize=1024%2C664" alt="" class="wp-image-95" srcset="https://i2.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ.png?resize=1024%2C664&amp;ssl=1 1024w, https://i2.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ.png?resize=300%2C194&amp;ssl=1 300w, https://i2.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ.png?resize=768%2C498&amp;ssl=1 768w, https://i2.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ.png?resize=750%2C486&amp;ssl=1 750w, https://i2.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_6iILXwylZfEwGs_th1_McQ.png?w=1336&amp;ssl=1 1336w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure>



<p>অবশেষে, আমরা কম্পোনেন্টটির <strong>selector name</strong>&nbsp; কল করতে পারি এবং তারপরে আমাদের ওয়েবপেজে এটি দেখতে সক্ষম হওয়া উচিত:</p>



<figure class="wp-block-image"><img loading="lazy" width="738" height="166" src="https://i0.wp.com/bipon.me/wp-content/uploads/2019/09/1_tkvIZOpK8kdqfPIPAv0Ghw.png?resize=738%2C166" alt="" class="wp-image-96" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_tkvIZOpK8kdqfPIPAv0Ghw.png?w=738&amp;ssl=1 738w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_tkvIZOpK8kdqfPIPAv0Ghw.png?resize=300%2C67&amp;ssl=1 300w" sizes="(max-width: 738px) 100vw, 738px" data-recalc-dims="1" /></figure>



<p>যেহেতু অ্যাঙ্গুলার একটি মডিউলার ফ্রেমওয়ার্ক, তাই প্রতিটি কম্পোনেন্ট, সার্ভিস এবং অন্যান্য অ্যাঙ্গুলারের&nbsp; বৈশিষ্ট্যগুলি অ্যাপ মডিউল (App Module) (বা একটি কাস্টম মডিউল) এর মধ্যে সংরক্ষণ করতে হবে, তাই আমরা এগুলি প্রজেক্টর যে কোনও জায়গায় ব্যবহার করতে পারি।<br></p>



<p><strong>একটু কম্পোনেন্ট জন্য এত প্রচেষ্টা?</strong><br></p>



<p>চিন্তা করবেন না, এই সমস্ত পদক্ষেপগুলি অ্যাংগুলার&nbsp; সিএলআই (CLI) দ্বারা স্বয়ংক্রিয়ভাবে করা যেতে পারে, তবে প্রয়োজন হলে আপনি নিজেই এগুলি সম্পাদনা করতে পারেন।</p>



<p><strong>এনজিওনিট কী?</strong><br></p>



<p>ঠিক আছে, এখন আপনি কীভাবে একটি কম্পোনেন্ট&nbsp; তৈরি করবেন তা শিখলেন। আপনি যখন একটি নতুন কম্পোনেন্ট&nbsp; তৈরি করবেন, আপনি বুঝতে পারবেন যে এনজিওএনইনিট () নামের একটি পদ্ধতি কন্সট্রাক্টরের&nbsp; নীচে উপস্থিত হবে:</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="599" src="https://i1.wp.com/bipon.me/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA-1024x599.png?resize=1024%2C599" alt="" class="wp-image-97" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA.png?resize=1024%2C599&amp;ssl=1 1024w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA.png?resize=300%2C175&amp;ssl=1 300w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA.png?resize=768%2C449&amp;ssl=1 768w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA.png?resize=750%2C439&amp;ssl=1 750w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2019/09/1_u1FEJwtu0dfQVGF8e9pUzA.png?w=1330&amp;ssl=1 1330w" sizes="(max-width: 1024px) 100vw, 1024px" data-recalc-dims="1" /></figure>



<p>প্রতিটি কম্পোনেন্টর একটি লাইফ সাইকেল আছে। ngOnInit() মেথডটি অ্যাঙ্গুলার কম্পোনেন্ট ইমমেডিয়েটলি শেষ করার সাথে সাথে ডাকা হয়। অন্য কথায়, অ্যাঙ্গুলার&nbsp; আমাদের বলছে যে &#8220;কম্পোনেন্ট  প্রস্তুত&#8221;।<br></p>



<p>আমরা ngOnInit () মেথডটির অভ্যন্তরে কী করতে পারি তা হ&#8217;ল কিছু ক্রিয়াকলাপ যেমন ডেটা আনার মতো, বা অন পেজ লোডে আমরা তত্ক্ষণাত দেখতে চাই। কনস্ট্রাক্টরের ভিতরে এই ধরণের ক্রিয়াকলাপ করার পরামর্শ দেওয়া হয় না, সুতরাং এর পরিবর্তে আমাদের এনজিওএনট ( ngOnInit()) রয়েছে ।&nbsp;<br></p>



<p><strong>অ্যাঙ্গুলারের ক্ষেত্রে, কনস্ট্রাক্টর কেবল ডিপেন্ডেন্সি ইনজেকশনের জন্য দায়ী হওয়া উচিত।</strong></p>



<p>অ্যাঙ্গুলার&nbsp; অফিসিয়াল নথি অনুসারে, আমাদের জন্য ngOnInit() মেথডটি প্রয়োজন:<br></p>



<ol><li><strong>To perform complex initializations shortly after construction.</strong></li><li><strong>To set up the component after Angular sets the input properties.</strong></li></ol>



<p>কোনও ngOnInit()&nbsp; কোনও কম্পোনেন্টটির প্রাথমিক ডেটা আনার জন্য একটি ভাল জায়গা। &#8211; <strong>অ্যাঙ্গুলার&nbsp; অফিসিয়াল ডক্স</strong></p>



<p>আরও তথ্যের জন্য আপনি <a href="https://angular.io/guide/lifecycle-hooks#oninit">এখানে</a> এবং <a href="https://angular.io/api/core/OnInit">এখানেও</a> দেখতে করতে পারেন।<br></p>



<p>অ্যাঙ্গুলার শেখার একটি বড় পদক্ষেপ হ&#8217;ল কম্পোনেন্ট কীভাবে তৈরি করতে হয় এবং দক্ষতার সাথে সেগুলি ব্যবহার করতে হয় তা জেনে রাখা।&nbsp; আপনার যদি কোনও প্রশ্ন থাকে তবে মন্তব্য বিভাগে জিজ্ঞাসা করতে দ্বিধা করবেন না।<br></p>



<p>আপনার সময় এবং সহায়তার জন্য আপনাকে ধন্যবাদ!<br></p><p>The post <a href="https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/">অ্যাঙ্গুলার 7 কম্পোনেন্ট তৈরি ও ব্যবহার করবেন কীভাবে?</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/how-to-create-and-use-angular-component/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">89</post-id>	</item>
		<item>
		<title>Day 3 &#8211; Interpolation</title>
		<link>https://biponnotes.iglyphic.com/day-3-interpolation/</link>
					<comments>https://biponnotes.iglyphic.com/day-3-interpolation/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Mon, 16 Sep 2019 19:26:01 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[angularjs]]></category>
		<guid isPermaLink="false">http://bipon.me/?p=24</guid>

					<description><![CDATA[<p>Interpolation:&#160; Interpolation is a way angular use to display variables inside your HTML using the curly braces. You can display variables, named. Name &#60;b&#62;name&#60;b&#62; using {{name}}&#160; You can bind the data from the class to the template Bind data using double curly bracket {{property_name}} → there is class property name here. Then showing dynamic value.&#160;&#8230;<a href="https://biponnotes.iglyphic.com/day-3-interpolation/" class="more-link">Continue reading <span class="screen-reader-text">Day 3 &#8211; Interpolation</span></a></p>
<p>The post <a href="https://biponnotes.iglyphic.com/day-3-interpolation/">Day 3 – Interpolation</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>Interpolation:&nbsp;</strong><br></p>



<p><strong>Interpolation is a way angular use to display variables inside your HTML using the curly braces. You can display variables, named. Name &lt;b&gt;name&lt;b&gt; using {{name}}&nbsp;</strong><br></p>



<p>You can bind the data from the class to the template</p>



<ol><li>Bind data using double curly bracket</li></ol>



<p>{{property_name}} → there is class property name here. Then showing dynamic value.&nbsp;</p>



<p>2. Using expression&nbsp;</p>



<p>&lt;h2&gt;{{2+2}}&lt;/h2&gt;&nbsp; → output: 4</p>



<p>3. Also concatenation + property name&nbsp;</p>



<p>concatenation: &lt;p&gt;{{&#8220;welcome &#8221; + name}}&lt;/p&gt;</p>



<p>&lt;p&gt;{{name.length}}&lt;/p&gt;</p>



<p>&lt;p&gt;{{name.toUpperCase()}}&lt;/p&gt;</p>



<p>4. Using method</p>



<p>&lt;p&gt;{{greetUser()}}&lt;/p&gt;<br></p>



<p>5. Alternate way&nbsp;</p>



<p>public siteUrl = window.location.href;</p>



<p>&lt;p&gt;{{siteUrl}}&lt;/p&gt;<br></p>



<p><strong>Not possible:</strong>&nbsp;<br></p>



<p>&lt;p&gt;{{a = 2+2}}&lt;/p&gt; (You can not assign the expression in a variable. So assignment is not possible in a variable)</p>



<p>&lt;p&gt;{{window.location.href}}&lt;/p&gt; (so template is not aware javascript global variable)</p>



<p></p><p>The post <a href="https://biponnotes.iglyphic.com/day-3-interpolation/">Day 3 – Interpolation</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/day-3-interpolation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">24</post-id>	</item>
		<item>
		<title>দিন ৩– ইন্টারপোলেশন</title>
		<link>https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/</link>
					<comments>https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Mon, 16 Sep 2019 19:23:53 +0000</pubDate>
				<category><![CDATA[অ্যাঙ্গুলার]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[angularjs]]></category>
		<guid isPermaLink="false">http://bipon.me/?p=21</guid>

					<description><![CDATA[<p>ইন্টারপোলেশন (Interpolation):&#160; ইউজার টেমপ্লেট (template) এ ডাটা বাইন্ড করতে পারে ক্লাস (Class) থেকে &#8211;&#160;&#160; বাইন্ড ডাটা ডাবল কারলি ব্রাকেট ব্যবহার করে&#160; {{property_name}} → ডাবল কারলি ব্রাকেট এর মধ্যে ক্লাস প্রপার্টি নাম থাকবে । তাহলে ডাইনামিক ভ্যালু দেখাবে ।&#160; 2. ইউজিং সিনটেক্স &#60;h2&#62;{{2+2}}&#60;/h2&#62;&#160; → output: 4&#160; 3. স্ট্রিং কংক্যাটেনশন + প্রপার্টি নাম&#160;&#160; concatenation: &#60;p&#62;{{&#8220;welcome &#8221; +&#8230;<a href="https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/" class="more-link">Continue reading <span class="screen-reader-text">দিন ৩– ইন্টারপোলেশন</span></a></p>
<p>The post <a href="https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/">দিন ৩– ইন্টারপোলেশন</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>ইন্টারপোলেশন (Interpolation):&nbsp;</strong><br></p>



<p>ইউজার টেমপ্লেট (template) এ ডাটা বাইন্ড করতে পারে ক্লাস (Class) থেকে &#8211;&nbsp;&nbsp;</p>



<ol><li>বাইন্ড ডাটা ডাবল কারলি ব্রাকেট ব্যবহার করে&nbsp;</li></ol>



<p>{{property_name}} → ডাবল কারলি ব্রাকেট এর মধ্যে ক্লাস প্রপার্টি নাম থাকবে । তাহলে ডাইনামিক ভ্যালু দেখাবে ।&nbsp;</p>



<p>2. ইউজিং সিনটেক্স</p>



<p>&lt;h2&gt;{{2+2}}&lt;/h2&gt;&nbsp; → output: 4&nbsp;</p>



<p>3. স্ট্রিং কংক্যাটেনশন + প্রপার্টি নাম&nbsp;&nbsp;</p>



<p>concatenation: &lt;p&gt;{{&#8220;welcome &#8221; + name}}&lt;/p&gt;</p>



<p>&lt;p&gt;{{name.length}}&lt;/p&gt;</p>



<p>&lt;p&gt;{{name.toUpperCase()}}&lt;/p&gt;</p>



<p>4. ইউজিং মেথড&nbsp;</p>



<p>&lt;p&gt;{{greetUser()}}&lt;/p&gt;<br></p>



<p>কম্পোনেন্ট ফাইল</p>



<p>greetUser(){</p>



<p>Return “Hello ” + this.name;&nbsp;</p>



<p>}<br></p>



<p>5.অন্য ভাবে</p>



<p>public siteUrl = window.location.href;</p>



<p>&lt;p&gt;{{siteUrl}}&lt;/p&gt;<br></p>



<p><strong>Not possible:</strong>&nbsp;<br></p>



<p>&lt;p&gt;{{a = 2+2}}&lt;/p&gt; ভ্যারিয়েবল এ এক্সপ্রেশন এসাইন করা যাবে না । ব্রাউজার এর কনসোলে দেখাবে &#8211; Template parse error.&nbsp;</p>



<p>&lt;p&gt;{{window.location.href}}&lt;/p&gt; টেমপ্লেট&nbsp; জাভাস্ক্রিপ্ট গ্লোবাল ভ্যারিয়েবল বুঝে না । ব্রাউজার এর কনসোলে দেখাবে &#8211; location of undefined.&nbsp;<br></p>



<p><strong>possible:</strong></p>



<p>#&lt;p&gt;{{siteUrl}}&lt;/p&gt; (public siteUrl = window.location.href)</p>



<p></p>



<p></p><p>The post <a href="https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/">দিন ৩– ইন্টারপোলেশন</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/%e0%a6%a6%e0%a6%bf%e0%a6%a8-%e0%a7%a9-%e0%a6%87%e0%a6%a8%e0%a7%8d%e0%a6%9f%e0%a6%be%e0%a6%b0%e0%a6%aa%e0%a7%8b%e0%a6%b2%e0%a7%87%e0%a6%b6%e0%a6%a8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">21</post-id>	</item>
		<item>
		<title>Day 1 &#8211; Basic Functioning</title>
		<link>https://biponnotes.iglyphic.com/day-1-basic-functioning/</link>
					<comments>https://biponnotes.iglyphic.com/day-1-basic-functioning/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Fri, 13 Sep 2019 19:53:14 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angularcore]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">http://bipon.me/?p=13</guid>

					<description><![CDATA[<p># what and why ?&#160; Framework to build client side application Great for SPAs # Why Modular approach Re-usable code Development quicker and easier (like validation, routing) Unit testable and easily maintainable code Google + Microsoft product (Angular + Typescript) # Angular’s History 2010 &#8211; AngularJS 2016 &#8211; Angular version 2. Just called Angular 2016&#8230;<a href="https://biponnotes.iglyphic.com/day-1-basic-functioning/" class="more-link">Continue reading <span class="screen-reader-text">Day 1 &#8211; Basic Functioning</span></a></p>
<p>The post <a href="https://biponnotes.iglyphic.com/day-1-basic-functioning/">Day 1 – Basic Functioning</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong># what and why ?&nbsp;</strong></p>



<p>Framework to build client side application</p>



<p>Great for SPAs<br></p>



<p><strong># Why</strong></p>



<p>Modular approach</p>



<p>Re-usable code</p>



<p>Development quicker and easier (like validation, routing)</p>



<p>Unit testable and easily maintainable code</p>



<p>Google + Microsoft product (Angular + Typescript)<br></p>



<p><strong># Angular’s History</strong></p>



<p>2010 &#8211; AngularJS</p>



<p>2016 &#8211; Angular version 2. Just called Angular</p>



<p>2016 Dec &#8211; Angular version 4</p>



<p>2017 Nov &#8211; Angular version 5</p>



<p>2018 Oct &#8211; Angular version 7</p>



<p></p>



<p><strong>Day1 &#8211; Basic Functioning&nbsp;</strong><br></p>



<p><strong>Prerequisites &#8211; to learn Angular</strong><br></p>



<ul><li>HTML, CSS, JS</li><li>Basic of Typescript</li></ul>



<p><strong>Development Environment:&nbsp;</strong></p>



<ul><li>Node &#8211; <a href="https://nodejs.org/en/">https://nodejs.org/en/</a></li><li>Node Version check &#8211; node -v</li><li>NPM (npm install -g. Check = npm -v)</li><li>Angular CLI (npm install -g @angular/cli)</li><li>CLI version check (ng -v)</li><li>Text Editor like VS Editor</li></ul>



<p>&nbsp;<strong>New project creation&nbsp;</strong></p>



<ul><li>Open your Git bash interface and then write bellow command&nbsp;</li></ul>



<ul><li>ng new project_name (ng new hello-world)&nbsp;</li></ul>



<p><strong>#way 2</strong></p>



<p>VS Editor</p>



<ul><li>View &gt;&gt; Integrated Terminal &gt;&gt; ng new hello-world</li><li>Going to project &#8211; cd hello-world</li><li>Run the project &#8211; ng serve</li><li>After compile successfully&nbsp;</li><li>Then going to browser localhost:4200</li></ul>



<p></p>



<p><strong>Module</strong></p>



<ul><li>First building block is a Module</li></ul>



<ul><li>Angular application is collection individual module</li><li>Angular must have on module <strong>Root Module</strong> &#8211; AppModule<ul><li>Module have two things</li><li>Component (Root component &#8211; AppComponent)</li><li>Service &#8211; Here have business logic</li></ul></li><li>Export and Import (interact and ultimately render the view in the browser)</li></ul>



<p>Component</p>



<ul><li>Angular must have on component Root component &#8211; AppComponent&nbsp;<ul><li>Component have two things</li><li>HTML Template (To represent the view)</li><li>Class (View logic &#8211; control the particular logic)</li></ul></li></ul>



<p>Service&nbsp;</p>



<ul><li>Module&nbsp;<ul><li>Service under Module&nbsp;</li><li>Service there write business logic of your application&nbsp;</li></ul></li></ul>



<p>Architecture Summary&nbsp;</p>



<ul><li>Angular app &#8211; one or more modules</li><li>Module &#8211; one or more components and services</li><li>Components &#8211; HTML (contain the html template) + Class (class control the logic for the particular view )</li><li>Service &#8211; Business Logic (contains the business logic)</li><li>Modules interact and ultimately render the view in the browser&nbsp;</li></ul>



<p>Package.json</p>



<ul><li>This file contains the dependency &amp; the dev dependency that are required for angular application&nbsp;</li><li>Project run &#8211; ng serve or npm start (npm start means internally call ng serve)</li></ul>



<p>Main.ts&nbsp;</p>



<ul><li>This is the entry point to the application&nbsp;</li><li>If run the ng serve command then application come to main.ts file then bootstrap and kickstart appModule → bootstrap appComponent. And appComponent (have two things HTML template + class (contains the data for particular view logic)</li><li>) and render the HTML.&nbsp; Initially class have title property sync/bound with component html by interpolation. Also other html is static&nbsp;</li></ul>



<p>App.module.ts:&nbsp;</p>



<ul><li>This is the main module for any angular application. Also app.component.ts file is the root component of angular application&nbsp;</li></ul>



<p>Operation flow:&nbsp;</p>



<ul><li>When we run the command ng serve into git bash then execution comes to <strong>main.ts</strong> file . then goes to <strong>app.module.ts</strong> file. then <strong>bootstrap: [AppComponent]</strong>&nbsp;</li><li>Then goes to <strong>app.component</strong>&nbsp;</li><li>Then data property title gets render in the <strong>app.component.html&nbsp;</strong></li><li>&nbsp;AppComponent have two things<ul><li>Html file</li><li>Component &#8211; (contain class &gt;&nbsp; to control the view logic)</li></ul></li></ul><p>The post <a href="https://biponnotes.iglyphic.com/day-1-basic-functioning/">Day 1 – Basic Functioning</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/day-1-basic-functioning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13</post-id>	</item>
	</channel>
</rss>
