{"id":34825,"date":"2025-11-22T13:40:40","date_gmt":"2025-11-22T10:40:40","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=34825"},"modified":"2025-11-22T13:40:40","modified_gmt":"2025-11-22T10:40:40","slug":"angular-router-alt-rota-tanimlamasi","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/","title":{"rendered":"Angular Router: Alt Rota Tan\u0131mlamas\u0131"},"content":{"rendered":"<p><body><\/p>\n<h2>Angular Router: Alt Rota Tan\u0131mlamas\u0131<\/h2>\n<p>Angular uygulamalar\u0131, tek sayfal\u0131k uygulama (Single Page Application &#8211; SPA) mimarisinin g\u00fcc\u00fcn\u00fc kullanarak modern ve dinamik kullan\u0131c\u0131 deneyimleri sunar. Bu deneyimlerin temelini, kullan\u0131c\u0131lar\u0131n farkl\u0131 g\u00f6r\u00fcn\u00fcmler aras\u0131nda sorunsuz bir \u015fekilde gezinmesini sa\u011flayan y\u00f6nlendirme (routing) mekanizmas\u0131 olu\u015fturur. Angular Router, bu y\u00f6nlendirme ihtiya\u00e7lar\u0131n\u0131 kar\u015f\u0131lamak i\u00e7in g\u00fc\u00e7l\u00fc ve esnek bir \u00e7\u00f6z\u00fcm sunar. Uygulama karma\u015f\u0131kl\u0131\u011f\u0131 artt\u0131k\u00e7a, sadece ana rotalar de\u011fil, ayn\u0131 zamanda belirli bir ana rota alt\u0131nda hiyerar\u015fik olarak konumland\u0131r\u0131lm\u0131\u015f &#8220;alt rotalar&#8221; veya &#8220;\u00e7ocuk rotalar&#8221; (child routes) tan\u0131mlama ihtiyac\u0131 ortaya \u00e7\u0131kar. Bu makale, Angular Router&#8217;da alt rotalar\u0131n nas\u0131l tan\u0131mland\u0131\u011f\u0131n\u0131, neden \u00f6nemli olduklar\u0131n\u0131, kullan\u0131m senaryolar\u0131n\u0131 ve geli\u015fmi\u015f \u00f6zelliklerini detayl\u0131 bir \u015fekilde ele alacakt\u0131r.<\/p>\n<h3>Angular Rota Temelleri<\/h3>\n<p>Alt rotalar\u0131n derinliklerine dalmadan \u00f6nce, Angular&#8217;da temel rota kavramlar\u0131n\u0131 hat\u0131rlamak faydal\u0131 olacakt\u0131r. Angular Router, bir URL&#8217;yi bir bile\u015fenle e\u015fle\u015ftirmek i\u00e7in kullan\u0131l\u0131r. Bu sayede, kullan\u0131c\u0131lar taray\u0131c\u0131lar\u0131n\u0131n adres \u00e7ubu\u011fundaki URL&#8217;yi de\u011fi\u015ftirerek veya uygulama i\u00e7indeki ba\u011flant\u0131lara t\u0131klayarak farkl\u0131 g\u00f6r\u00fcn\u00fcmler aras\u0131nda ge\u00e7i\u015f yapabilirler.<\/p>\n<p>Bir Angular uygulamas\u0131nda y\u00f6nlendirme genellikle <code>AppRoutingModule<\/code> ad\u0131nda ayr\u0131 bir mod\u00fclde yap\u0131land\u0131r\u0131l\u0131r. Bu mod\u00fcl, uygulaman\u0131n k\u00f6k mod\u00fcl\u00fc olan <code>AppModule<\/code> taraf\u0131ndan i\u00e7e aktar\u0131l\u0131r. Temel rota yap\u0131land\u0131rmas\u0131 \u015fu \u015fekildedir:<\/p>\n<pre><code class=\"language-typescript\">\/\/ app-routing.module.ts\nimport { NgModule } from '@angular\/core';\nimport { RouterModule, Routes } from '@angular\/router';\nimport { HomeComponent } from '.\/home\/home.component';\nimport { AboutComponent } from '.\/about\/about.component';\nimport { ContactComponent } from '.\/contact\/contact.component';\n\nconst routes: Routes = [\n  { path: '', component: HomeComponent },\n  { path: 'about', component: AboutComponent },\n  { path: 'contact', component: ContactComponent },\n  { path: '<em><\/em>', redirectTo: '' } \/\/ Tan\u0131ms\u0131z yollar i\u00e7in ana sayfaya y\u00f6nlendirme\n];\n\n@NgModule({\n  imports: [RouterModule.forRoot(routes)],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule { }<\/code><\/pre>\n<p>Bu yap\u0131land\u0131rmada:<br \/>\n*   <code>Routes<\/code> dizisi, uygulama genelindeki t\u00fcm rotalar\u0131 tan\u0131mlayan <code>Route<\/code> nesneleri i\u00e7erir.<br \/>\n*   Her <code>Route<\/code> nesnesi, bir <code>path<\/code> (URL yolu) ve bu yolla ili\u015fkilendirilecek bir <code>component<\/code> (bile\u015fen) tan\u0131mlar.<br \/>\n*   <code>RouterModule.forRoot(routes)<\/code>, k\u00f6k y\u00f6nlendirme mod\u00fcl\u00fcn\u00fc yap\u0131land\u0131r\u0131r ve taray\u0131c\u0131 ge\u00e7mi\u015fi API&#8217;sini kullanarak URL&#8217;yi dinlemeye ba\u015flar.<br \/>\n*   <code>router-outlet<\/code> etiketi, e\u015fle\u015fen bile\u015fenin g\u00f6r\u00fcnt\u00fclenece\u011fi yer tutucudur. Genellikle <code>app.component.html<\/code> i\u00e7inde bulunur: <code><router-outlet><\/router-outlet><\/code>.<br \/>\n*   <code>routerLink<\/code> direktifi, HTML ba\u011flant\u0131lar\u0131n\u0131 (<a>) Angular rotalar\u0131na ba\u011flamak i\u00e7in kullan\u0131l\u0131r: <code><a routerLink=\"\/about\">Hakk\u0131m\u0131zda<\/a><\/code>.<\/p>\n<p>Bu temel yap\u0131, basit uygulamalar i\u00e7in yeterli olsa da, daha karma\u015f\u0131k kullan\u0131c\u0131 aray\u00fczleri ve i\u015f mant\u0131klar\u0131 i\u00e7in yetersiz kalmaktad\u0131r. \u0130\u015fte bu noktada alt rotalar\u0131n g\u00fcc\u00fc devreye girer.<\/p>\n<h3>Alt Rotalar Neden Gereklidir?<\/h3>\n<p>Modern web uygulamalar\u0131 genellikle derinlemesine ve katmanl\u0131 bir yap\u0131ya sahiptir. \u00d6rne\u011fin, bir y\u00f6netici paneli uygulamas\u0131n\u0131 d\u00fc\u015f\u00fcn\u00fcn. Bu panelin &#8220;Kullan\u0131c\u0131lar&#8221;, &#8220;\u00dcr\u00fcnler&#8221;, &#8220;Ayarlar&#8221; gibi ana b\u00f6l\u00fcmleri olabilir. Her bir ana b\u00f6l\u00fcm\u00fcn de kendi i\u00e7inde &#8220;Kullan\u0131c\u0131 Listesi&#8221;, &#8220;Yeni Kullan\u0131c\u0131 Ekle&#8221;, &#8220;Kullan\u0131c\u0131 Detaylar\u0131&#8221; veya &#8220;Genel Ayarlar&#8221;, &#8220;G\u00fcvenlik Ayarlar\u0131&#8221; gibi alt b\u00f6l\u00fcmleri bulunabilir. Bu t\u00fcr hiyerar\u015fik yap\u0131lar\u0131 d\u00fcz rotalarla y\u00f6netmek karma\u015f\u0131kl\u0131\u011f\u0131 art\u0131r\u0131r ve kodun okunabilirli\u011fini azalt\u0131r.<\/p>\n<p>Alt rotalar\u0131n temel faydalar\u0131 \u015funlard\u0131r:<\/p>\n<p>*   <strong>Mod\u00fclerlik ve Kod D\u00fczeni:<\/strong> Uygulaman\u0131n farkl\u0131 b\u00f6l\u00fcmlerini mant\u0131ksal olarak izole etmeyi sa\u011flar. Her bir ana b\u00f6l\u00fcm\u00fcn kendi y\u00f6nlendirme mant\u0131\u011f\u0131na ve alt bile\u015fenlerine sahip olmas\u0131, kod taban\u0131n\u0131 daha d\u00fczenli ve y\u00f6netilebilir hale getirir.<br \/>\n*   <strong>Daha \u0130yi Kullan\u0131c\u0131 Deneyimi (UX):<\/strong> Kullan\u0131c\u0131lar\u0131n bir b\u00f6l\u00fcm i\u00e7inde gezinirken, ana navigasyonun de\u011fi\u015fmeden kalmas\u0131n\u0131 sa\u011flar. \u00d6rne\u011fin, bir profil sayfas\u0131nda &#8220;Profil Bilgileri&#8221; ve &#8220;\u015eifre De\u011fi\u015ftir&#8221; sekmeleri aras\u0131nda ge\u00e7i\u015f yaparken, ana men\u00fc sabit kal\u0131r.<br \/>\n*   <strong>Hiyerar\u015fik URL Yap\u0131s\u0131:<\/strong> URL&#8217;lerin uygulaman\u0131n hiyerar\u015fik yap\u0131s\u0131n\u0131 yans\u0131tmas\u0131na olanak tan\u0131r (\u00f6rn: <code>\/dashboard\/users\/123\/edit<\/code>). Bu, kullan\u0131c\u0131lar ve arama motorlar\u0131 i\u00e7in daha anlaml\u0131 ve tahmin edilebilir URL&#8217;ler olu\u015fturur.<br \/>\n*   <strong>Tembel Y\u00fckleme (Lazy Loading):<\/strong> B\u00fcy\u00fck uygulamalarda, belirli bir ana rotan\u0131n ve onun t\u00fcm alt rotalar\u0131n\u0131n yaln\u0131zca kullan\u0131c\u0131 o ana rotaya gitti\u011finde y\u00fcklenmesini sa\u011flayarak ba\u015flang\u0131\u00e7 y\u00fckleme s\u00fcresini optimize eder. Bu, \u00f6zellikle alt rotalar\u0131 olan b\u00fcy\u00fck \u00f6zellik mod\u00fclleri i\u00e7in kritik \u00f6neme sahiptir.<br \/>\n*   <strong>Bile\u015fen Kapsam\u0131n\u0131n Korunmas\u0131:<\/strong> Bir ana bile\u015fenin kendi i\u00e7inde alt bile\u015fenleri y\u00f6netmesini ve bunlar\u0131n ya\u015fam d\u00f6ng\u00fcs\u00fcn\u00fc kontrol etmesini kolayla\u015ft\u0131r\u0131r. Ana bile\u015fen, alt bile\u015fenler i\u00e7in bir konteyner g\u00f6revi g\u00f6r\u00fcr.<\/p>\n<h3>Alt Rota Tan\u0131mlamas\u0131: Ad\u0131m Ad\u0131m<\/h3>\n<p>Angular&#8217;da alt rota tan\u0131mlamak i\u00e7in, ana rota tan\u0131m\u0131na <code>children<\/code> \u00f6zelli\u011fini ekleriz. Bu \u00f6zellik, ana rotan\u0131n alt\u0131ndaki rotalar\u0131 i\u00e7eren bir <code>Routes<\/code> dizisi al\u0131r.<\/p>\n<h4>Temel Yap\u0131<\/h4>\n<p>Bir ana rota alt\u0131nda alt rotalar\u0131 tan\u0131mlamak i\u00e7in, ana rotan\u0131n <code>Route<\/code> nesnesine bir <code>children<\/code> \u00f6zelli\u011fi eklenir. Bu <code>children<\/code> dizisi, ana rotan\u0131n alt\u0131ndaki rotalar\u0131 i\u00e7eren <code>Route<\/code> nesnelerinden olu\u015fur.<\/p>\n<pre><code class=\"language-typescript\">const routes: Routes = [\n  {\n    path: 'dashboard',\n    component: DashboardComponent, \/\/ Ana bile\u015fen\n    children: [ \/\/ Alt rotalar\n      { path: 'overview', component: DashboardOverviewComponent },\n      { path: 'reports', component: DashboardReportsComponent },\n      { path: 'settings', component: DashboardSettingsComponent }\n    ]\n  },\n  \/\/ ... di\u011fer rotalar\n];<\/code><\/pre>\n<p>Bu \u00f6rnekte, <code>\/dashboard<\/code> yolu <code>DashboardComponent<\/code>&#8216;i y\u00fckler. <code>\/dashboard\/overview<\/code> yolu ise <code>DashboardComponent<\/code>&#8216;in i\u00e7inde <code>DashboardOverviewComponent<\/code>&#8216;i y\u00fckler. <code>\/dashboard\/reports<\/code> ve <code>\/dashboard\/settings<\/code> i\u00e7in de benzer durum ge\u00e7erlidir.<\/p>\n<p><strong>\u00d6nemli Not:<\/strong> Alt rotalar\u0131n y\u00fcklenebilmesi i\u00e7in, ana bile\u015fen (<code>DashboardComponent<\/code> bu \u00f6rnekte) kendi \u015fablonunda bir <code><router-outlet><\/router-outlet><\/code> etiketine sahip olmal\u0131d\u0131r. Bu <code>router-outlet<\/code>, alt rotan\u0131n e\u015fle\u015fen bile\u015feninin g\u00f6r\u00fcnt\u00fclenece\u011fi yerdir.<\/p>\n<h4>Kod \u00d6rne\u011fi ve A\u00e7\u0131klamas\u0131<\/h4>\n<p>\u015eimdi bu konsepti daha somut bir \u00f6rnekle ele alal\u0131m. Bir kullan\u0131c\u0131 profil sayfas\u0131 d\u00fc\u015f\u00fcnelim. Bu sayfan\u0131n &#8220;Genel Bilgiler&#8221;, &#8220;Sipari\u015f Ge\u00e7mi\u015fi&#8221; ve &#8220;Adresler&#8221; gibi alt b\u00f6l\u00fcmleri olsun.<\/p>\n<p>\u00d6ncelikle gerekli bile\u015fenleri olu\u015ftural\u0131m:<\/p>\n<pre><code class=\"language-bash\">ng generate component user-profile\nng generate component user-profile\/general-info\nng generate component user-profile\/order-history\nng generate component user-profile\/addresses<\/code><\/pre>\n<p>\u015eimdi <code>app-routing.module.ts<\/code> dosyam\u0131z\u0131 g\u00fcncelleyelim:<\/p>\n<pre><code class=\"language-typescript\">\/\/ app-routing.module.ts\nimport { NgModule } from '@angular\/core';\nimport { RouterModule, Routes } from '@angular\/router';\nimport { HomeComponent } from '.\/home\/home.component';\nimport { UserProfileComponent } from '.\/user-profile\/user-profile.component';\nimport { GeneralInfoComponent } from '.\/user-profile\/general-info\/general-info.component';\nimport { OrderHistoryComponent } from '.\/user-profile\/order-history\/order-history.component';\nimport { AddressesComponent } from '.\/user-profile\/addresses\/addresses.component';\n\nconst routes: Routes = [\n  { path: '', component: HomeComponent },\n  {\n    path: 'profile',\n    component: UserProfileComponent,\n    children: [\n      { path: 'general', component: GeneralInfoComponent },\n      { path: 'orders', component: OrderHistoryComponent },\n      { path: 'addresses', component: AddressesComponent }\n    ]\n  },\n  { path: '<em><\/em>', redirectTo: '' }\n];\n\n@NgModule({\n  imports: [RouterModule.forRoot(routes)],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule { }<\/code><\/pre>\n<p>\u015eimdi <code>UserProfileComponent<\/code>&#8216;in \u015fablonunu (user-profile.component.html) d\u00fczenleyelim:<\/p>\n<pre><code class=\"language-html\"><!-- user-profile.component.html -->\n<div>\n  <h2>Kullan\u0131c\u0131 Profilim<\/h2>\n  <nav>\n    <ul>\n      <li><a routerLink=\"general\" routerLinkActive=\"active\">Genel Bilgiler<\/a><\/li>\n      <li><a routerLink=\"orders\" routerLinkActive=\"active\">Sipari\u015f Ge\u00e7mi\u015fi<\/a><\/li>\n      <li><a routerLink=\"addresses\" routerLinkActive=\"active\">Adreslerim<\/a><\/li>\n    <\/ul>\n  <\/nav>\n\n  <hr>\n\n  <!-- Alt rota bile\u015fenleri burada y\u00fcklenecek -->\n  <router-outlet><\/router-outlet>\n<\/div><\/code><\/pre>\n<p><code>routerLink<\/code> direktiflerinde g\u00f6receli yollar kulland\u0131\u011f\u0131m\u0131za dikkat edin (<code>general<\/code>, <code>orders<\/code>, <code>addresses<\/code>). Bu, <code>profile<\/code> rotas\u0131n\u0131n alt\u0131nda olduklar\u0131 i\u00e7in Angular Router&#8217;\u0131n otomatik olarak <code>\/profile\/general<\/code>, <code>\/profile\/orders<\/code> gibi tam yollar\u0131 olu\u015fturmas\u0131n\u0131 sa\u011flar.<\/p>\n<h4>Bo\u015f Yol (Empty Path) ve Varsay\u0131lan Alt Rota<\/h4>\n<p>Bir ana rotaya gidildi\u011finde (\u00f6rn: <code>\/profile<\/code>), varsay\u0131lan olarak belirli bir alt rotan\u0131n y\u00fcklenmesini isteyebiliriz (\u00f6rn: <code>\/profile\/general<\/code>). Bunu sa\u011flamak i\u00e7in, <code>children<\/code> dizisinde bo\u015f bir <code>path<\/code> ile bir <code>redirectTo<\/code> kural\u0131 kullan\u0131r\u0131z.<\/p>\n<pre><code class=\"language-typescript\">\/\/ app-routing.module.ts (UserProfileComponent'in children rotalar\u0131)\nchildren: [\n  { path: '', redirectTo: 'general', pathMatch: 'full' }, \/\/ Varsay\u0131lan alt rota\n  { path: 'general', component: GeneralInfoComponent },\n  { path: 'orders', component: OrderHistoryComponent },\n  { path: 'addresses', component: AddressesComponent }\n]<\/code><\/pre>\n<p>Bu yap\u0131land\u0131rma ile, kullan\u0131c\u0131 <code>\/profile<\/code> adresine gitti\u011finde, Angular Router otomatik olarak <code>\/profile\/general<\/code> adresine y\u00f6nlendirecek ve <code>GeneralInfoComponent<\/code>&#8216;i y\u00fckleyecektir. <code>pathMatch: 'full'<\/code> \u00f6zelli\u011fi, bo\u015f yolun sadece tam olarak e\u015fle\u015fti\u011finde (yani ba\u015fka bir \u015fey olmad\u0131\u011f\u0131nda) y\u00f6nlendirmeyi tetiklemesini sa\u011flar.<\/p>\n<h3>Parametreli Alt Rotalar<\/h3>\n<p>\u00c7o\u011fu zaman, alt rotalar\u0131n belirli bir kayna\u011f\u0131n detaylar\u0131n\u0131 g\u00f6stermesi gerekir. \u00d6rne\u011fin, bir kullan\u0131c\u0131n\u0131n sipari\u015f ge\u00e7mi\u015fini g\u00f6r\u00fcnt\u00fclerken, belirli bir sipari\u015fin detaylar\u0131n\u0131 g\u00f6rmek i\u00e7in <code>\/profile\/orders\/123<\/code> gibi bir URL yap\u0131s\u0131 kullanmak isteyebiliriz. Burada <code>123<\/code>, sipari\u015f ID&#8217;sidir.<\/p>\n<p>Parametreli rotalar, <code>path<\/code> i\u00e7inde iki nokta \u00fcst \u00fcste (<code>:<\/code>) ile belirtilir:<\/p>\n<pre><code class=\"language-typescript\">children: [\n  \/\/ ... di\u011fer alt rotalar\n  { path: 'orders', component: OrderHistoryComponent },\n  { path: 'orders\/:orderId', component: OrderDetailComponent } \/\/ Parametreli alt rota\n]<\/code><\/pre>\n<p>Bu durumda, <code>\/profile\/orders\/123<\/code> adresine gidildi\u011finde <code>OrderDetailComponent<\/code> y\u00fcklenecektir. <code>OrderDetailComponent<\/code> i\u00e7inde <code>ActivatedRoute<\/code> servisini kullanarak bu parametreye eri\u015febiliriz:<\/p>\n<pre><code class=\"language-typescript\">\/\/ order-detail.component.ts\nimport { Component, OnInit } from '@angular\/core';\nimport { ActivatedRoute } from '@angular\/router';\n\n@Component({\n  selector: 'app-order-detail',\n  template: <code>\n    <h3>Sipari\u015f Detay\u0131: {{ orderId }}<\/h3>\n    <!-- Sipari\u015f detaylar\u0131n\u0131 g\u00f6ster -->\n  <\/code>\n})\nexport class OrderDetailComponent implements OnInit {\n  orderId: string | null = null;\n\n  constructor(private route: ActivatedRoute) { }\n\n  ngOnInit():\n    this.route.paramMap.subscribe(params => {\n      this.orderId = params.get('orderId');\n    });\n\n    \/\/ Veya snapshot kullanarak (sadece bir kez okunacaksa)\n    \/\/ this.orderId = this.route.snapshot.paramMap.get('orderId');\n  }\n}<\/code><\/pre>\n<p><code>paramMap<\/code> bir <code>Observable<\/code> d\u00f6nd\u00fcrd\u00fc\u011f\u00fc i\u00e7in, rota parametreleri de\u011fi\u015fti\u011finde (\u00f6rne\u011fin, ayn\u0131 bile\u015fende <code>\/orders\/123<\/code>&#8216;ten <code>\/orders\/456<\/code>&#8216;ya ge\u00e7i\u015f yap\u0131ld\u0131\u011f\u0131nda) bile\u015fen g\u00fcncellenebilir. <code>snapshot<\/code> ise parametreleri sadece bile\u015fen ilk y\u00fcklendi\u011finde okur.<\/p>\n<p>Ana rotadan alt rotalara parametre ge\u00e7irme de m\u00fcmk\u00fcnd\u00fcr. \u00d6rne\u011fin, <code>\/users\/:userId\/profile<\/code> gibi bir yap\u0131da, <code>profile<\/code> alt rotas\u0131 <code>userId<\/code> parametresine eri\u015febilir. Bu durumda, alt bile\u015fen <code>ActivatedRoute<\/code> \u00fczerinden hem kendi parametrelerine hem de \u00fcst rotan\u0131n parametrelerine eri\u015febilir.<\/p>\n<pre><code class=\"language-typescript\">\/\/ user-profile.component.ts\nimport { Component, OnInit } from '@angular\/core';\nimport { ActivatedRoute } from '@angular\/router';\n\n@Component({\n  selector: 'app-user-profile',\n  template: <code>\n    <h2>Kullan\u0131c\u0131 Profili: {{ userId }}<\/h2>\n    <router-outlet><\/router-outlet>\n  <\/code>\n})\nexport class UserProfileComponent implements OnInit {\n  userId: string | null = null;\n\n  constructor(private route: ActivatedRoute) { }\n\n  ngOnInit(): void {\n    this.route.paramMap.subscribe(params => {\n      this.userId = params.get('userId'); \/\/ Ana rotan\u0131n parametresine eri\u015fim\n    });\n  }\n}<\/code><\/pre>\n<p>Bu senaryoda, <code>app-routing.module.ts<\/code>&#8216;deki ana rota tan\u0131m\u0131 \u015f\u00f6yle olabilir:<\/p>\n<pre><code class=\"language-typescript\">{\n  path: 'users\/:userId', \/\/ Ana rota parametresi\n  component: UserProfileComponent,\n  children: [\n    { path: 'profile-info', component: UserProfileInfoComponent },\n    \/\/ ... di\u011fer alt rotalar\n  ]\n}<\/code><\/pre>\n<p><code>UserProfileInfoComponent<\/code> i\u00e7inde de <code>ActivatedRoute<\/code> kullanarak <code>userId<\/code> parametresine eri\u015filebilir. Angular Router, \u00fcst rotalar\u0131n parametrelerini alt rotalara otomatik olarak miras b\u0131rak\u0131r.<\/p>\n<h3>Mod\u00fcler Yap\u0131 ve Lazy Loading ile Alt Rotalar<\/h3>\n<p>B\u00fcy\u00fck Angular uygulamalar\u0131nda, t\u00fcm uygulaman\u0131n tek bir mod\u00fclde ve tek bir paket olarak y\u00fcklenmesi performans\u0131 olumsuz etkileyebilir. Bu sorunu \u00e7\u00f6zmek i\u00e7in Angular, &#8220;\u00f6zellik mod\u00fclleri&#8221; (feature modules) ve &#8220;tembel y\u00fckleme&#8221; (lazy loading) kavramlar\u0131n\u0131 sunar. Alt rotalar, bu mekanizmalarla birlikte kullan\u0131ld\u0131\u011f\u0131nda uygulaman\u0131n \u00f6l\u00e7eklenebilirli\u011fini ve performans\u0131n\u0131 \u00f6nemli \u00f6l\u00e7\u00fcde art\u0131r\u0131r.<\/p>\n<h4>Feature Mod\u00fclleri ve Alt Rotalar<\/h4>\n<p>Bir \u00f6zellik mod\u00fcl\u00fc, belirli bir uygulama alan\u0131na (\u00f6rn: Y\u00f6netici Paneli, \u00dcr\u00fcnler, Kullan\u0131c\u0131lar) ait bile\u015fenleri, servisleri ve rotalar\u0131 bir araya getiren bir <code>NgModule<\/code>&#8216;d\u00fcr. Her \u00f6zellik mod\u00fcl\u00fc kendi y\u00f6nlendirme mod\u00fcl\u00fcne (<code>FeatureRoutingModule<\/code>) sahip olabilir. Bu mod\u00fcl, <code>RouterModule.forChild(routes)<\/code> kullanarak kendi rotalar\u0131n\u0131 tan\u0131mlar.<\/p>\n<p>\u00d6rnek olarak bir <code>AdminModule<\/code> ve onun alt\u0131ndaki rotalar\u0131 ele alal\u0131m:<\/p>\n<pre><code class=\"language-bash\">ng generate module admin --routing<\/code><\/pre>\n<p>Bu komut, <code>AdminModule<\/code> ve <code>AdminRoutingModule<\/code>&#8216;i olu\u015fturur.<\/p>\n<pre><code class=\"language-typescript\">\/\/ admin-routing.module.ts\nimport { NgModule } from '@angular\/core';\nimport { RouterModule, Routes } from '@angular\/router';\nimport { AdminDashboardComponent } from '.\/admin-dashboard\/admin-dashboard.component';\nimport { ManageUsersComponent } from '.\/manage-users\/manage-users.component';\nimport { ManageProductsComponent } from '.\/manage-products\/manage-products.component';\n\nconst routes: Routes = [\n  {\n    path: '', \/\/ Admin mod\u00fcl\u00fcn\u00fcn k\u00f6k yolu\n    component: AdminDashboardComponent,\n    children: [\n      { path: 'users', component: ManageUsersComponent },\n      { path: 'products', component: ManageProductsComponent },\n      { path: '', redirectTo: 'users', pathMatch: 'full' } \/\/ Admin mod\u00fcl\u00fcn\u00fcn varsay\u0131lan alt rotas\u0131\n    ]\n  }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)], \/\/ forChild kullan\u0131yoruz\n  exports: [RouterModule]\n})\nexport class AdminRoutingModule { }<\/code><\/pre>\n<p>Bu <code>AdminRoutingModule<\/code>, <code>AdminModule<\/code> i\u00e7inde i\u00e7e aktar\u0131l\u0131r. Ana <code>AppRoutingModule<\/code> ise bu <code>AdminModule<\/code>&#8216;\u00fc tembel y\u00fckleme (lazy loading) ile y\u00fckler.<\/p>\n<h4>Lazy Loading (Tembel Y\u00fckleme) ile Alt Rotalar<\/h4>\n<p>Tembel y\u00fckleme, bir mod\u00fcl\u00fcn ve onunla ili\u015fkili t\u00fcm bile\u015fenlerin ve rotalar\u0131n, yaln\u0131zca kullan\u0131c\u0131 o mod\u00fcl\u00fcn rotas\u0131na gitti\u011finde y\u00fcklenmesini sa\u011flar. Bu, uygulaman\u0131n ba\u015flang\u0131\u00e7 y\u00fckleme s\u00fcresini \u00f6nemli \u00f6l\u00e7\u00fcde azalt\u0131r. Alt rotalarla birlikte kullan\u0131ld\u0131\u011f\u0131nda, belirli bir ana b\u00f6l\u00fcm\u00fcn t\u00fcm alt rotalar\u0131, yaln\u0131zca ana b\u00f6l\u00fcm\u00fcn rotas\u0131na gidildi\u011finde y\u00fcklenir.<\/p>\n<p><code>AppRoutingModule<\/code> i\u00e7inde <code>loadChildren<\/code> \u00f6zelli\u011fini kullanarak bir mod\u00fcl\u00fc tembel y\u00fckleyebiliriz:<\/p>\n<pre><code class=\"language-typescript\">\/\/ app-routing.module.ts\nimport { NgModule } from '@angular\/core';\nimport { RouterModule, Routes } from '@angular\/router';\nimport { HomeComponent } from '.\/home\/home.component';\n\nconst routes: Routes = [\n  { path: '', component: HomeComponent },\n  {\n    path: 'admin',\n    loadChildren: () => import('.\/admin\/admin.module').then(m => m.AdminModule)\n  },\n  { path: '<em><\/em>', redirectTo: '' }\n];\n\n@NgModule({\n  imports: [RouterModule.forRoot(routes)],\n  exports: [RouterModule]\n})\nexport class AppRoutingModule { }<\/code><\/pre>\n<p>Bu yap\u0131land\u0131rma ile:<br \/>\n1.  Kullan\u0131c\u0131 <code>\/admin<\/code> adresine gitti\u011finde, <code>admin.module.ts<\/code> dosyas\u0131 ve i\u00e7indeki t\u00fcm bile\u015fenler, servisler ve <code>AdminRoutingModule<\/code> (kendi alt rotalar\u0131yla birlikte) dinamik olarak y\u00fcklenir.<br \/>\n2.  <code>AdminRoutingModule<\/code> i\u00e7inde tan\u0131mlanan alt rotalar (\u00f6rn: <code>users<\/code>, <code>products<\/code>), <code>\/admin\/users<\/code> veya <code>\/admin\/products<\/code> gibi URL&#8217;ler arac\u0131l\u0131\u011f\u0131yla eri\u015filebilir hale gelir.<br \/>\n3.  <code>AdminModule<\/code> y\u00fcklenene kadar, bu mod\u00fcl\u00fcn kodu uygulama paketine dahil edilmez, bu da ilk y\u00fckleme boyutunu k\u00fc\u00e7\u00fclt\u00fcr.<\/p>\n<p>Bu yakla\u015f\u0131m, b\u00fcy\u00fck ve karma\u015f\u0131k uygulamalar\u0131n performans\u0131n\u0131 ve y\u00f6netilebilirli\u011fini art\u0131rmak i\u00e7in end\u00fcstri standard\u0131 bir y\u00f6ntemdir.<\/p>\n<h3>Alt Rotalarda Router Outlet \u0130simlendirmesi (Named Outlets)<\/h3>\n<p>\u00c7o\u011fu durumda, uygulaman\u0131n ana \u015fablonunda veya bir ana bile\u015fenin \u015fablonunda tek bir <code><router-outlet><\/code> yeterlidir. Ancak, bazen ayn\u0131 anda birden fazla ba\u011f\u0131ms\u0131z rota g\u00f6r\u00fcn\u00fcm\u00fcn\u00fc g\u00f6r\u00fcnt\u00fclemek gerekebilir. \u00d6rne\u011fin, ana i\u00e7eri\u011fin yan\u0131nda bir sohbet penceresi veya bir bildirim pop-up&#8217;\u0131 gibi &#8220;yard\u0131mc\u0131 rotalar&#8221; (auxiliary routes) g\u00f6stermek isteyebilirsiniz. Bu t\u00fcr senaryolar i\u00e7in &#8220;isimli \u00e7\u0131k\u0131\u015flar&#8221; (named outlets) kullan\u0131l\u0131r.<\/p>\n<p>Bir <code><router-outlet><\/code> etiketine <code>name<\/code> \u00f6zelli\u011fi ekleyerek ona bir isim verebiliriz:<\/p>\n<pre><code class=\"language-html\"><!-- app.component.html -->\n<router-outlet><\/router-outlet> <!-- Ana router-outlet -->\n<router-outlet name=\"popup\"><\/router-outlet> <!-- \u0130simli router-outlet --><\/code><\/pre>\n<p>Daha sonra, rota yap\u0131land\u0131rmas\u0131nda <code>outlet<\/code> \u00f6zelli\u011fini kullanarak belirli bir rotay\u0131 bu isimli \u00e7\u0131k\u0131\u015fa y\u00f6nlendirebiliriz:<\/p>\n<pre><code class=\"language-typescript\">const routes: Routes = [\n  \/\/ ... di\u011fer rotalar\n  { path: 'messages', component: MessagesComponent, outlet: 'popup' }\n];<\/code><\/pre>\n<p>Bu rota, ana <code>router-outlet<\/code>&#8216;i etkilemeden <code>\/messages<\/code> yolunu <code>popup<\/code> isimli <code>router-outlet<\/code>&#8216;e y\u00fckler. Bir isimli \u00e7\u0131k\u0131\u015fa gitmek i\u00e7in <code>routerLink<\/code> kullan\u0131rken, <code>{ outlets: { popup: 'messages' } }<\/code> gibi bir s\u00f6zdizimi kullan\u0131l\u0131r. URL&#8217;de ise bu <code>(\/popup:messages)<\/code> \u015feklinde g\u00f6r\u00fcn\u00fcr.<\/p>\n<p>\u0130simli \u00e7\u0131k\u0131\u015flar, alt rotalarla do\u011frudan ilgili olmasa da, bir bile\u015fenin i\u00e7inde birden fazla ba\u011f\u0131ms\u0131z alt g\u00f6r\u00fcn\u00fcm\u00fc y\u00f6netme ihtiyac\u0131n\u0131 kar\u015f\u0131lad\u0131\u011f\u0131 i\u00e7in alt rota kavram\u0131n\u0131n bir uzant\u0131s\u0131 olarak d\u00fc\u015f\u00fcn\u00fclebilir. \u00d6zellikle, bir ana rotan\u0131n i\u00e7eri\u011fi de\u011fi\u015fmeden bir alt pencerenin veya yan panelin dinamik olarak y\u00fcklenmesi gerekti\u011finde faydal\u0131d\u0131r.<\/p>\n<h3>Yayg\u0131n Hatalar ve \u0130pu\u00e7lar\u0131<\/h3>\n<p>Alt rotalarla \u00e7al\u0131\u015f\u0131rken kar\u015f\u0131la\u015f\u0131labilecek baz\u0131 yayg\u0131n sorunlar ve bunlara y\u00f6nelik ipu\u00e7lar\u0131:<\/p>\n<p>*   <strong>Ana Bile\u015fende <code>router-outlet<\/code> Unutulmas\u0131:<\/strong> Alt rotalar\u0131n bile\u015fenleri, ana bile\u015fenin \u015fablonundaki <code>router-outlet<\/code> i\u00e7inde g\u00f6r\u00fcnt\u00fclenir. E\u011fer ana bile\u015fende bu etiket yoksa, alt rota bile\u015fenleri ekranda g\u00f6r\u00fcnmez.<br \/>\n*   <strong>Yanl\u0131\u015f G\u00f6receli Yollar:<\/strong> <code>routerLink<\/code> kullan\u0131rken veya <code>redirectTo<\/code> tan\u0131mlarken g\u00f6receli yollar\u0131 (<code>.\/<\/code> veya do\u011frudan alt yol ad\u0131) do\u011fru kullanmak \u00f6nemlidir. Bazen mutlak yollar (<code>\/<\/code>) kullan\u0131lmas\u0131 gerekti\u011fi durumlarda g\u00f6receli yollar hata verebilir.<br \/>\n*   <strong><code>pathMatch<\/code> Karma\u015fas\u0131:<\/strong> <code>pathMatch: 'full'<\/code> ve <code>pathMatch: 'prefix'<\/code> aras\u0131ndaki fark\u0131 anlamak \u00f6nemlidir. Varsay\u0131lan de\u011fer <code>prefix<\/code>&#8216;tir, yani URL&#8217;nin sadece ba\u015flang\u0131c\u0131n\u0131n e\u015fle\u015fmesi yeterlidir. <code>full<\/code> ise t\u00fcm URL&#8217;nin tam olarak e\u015fle\u015fmesini gerektirir. \u00d6zellikle bo\u015f yollar (<code>path: ''<\/code>) veya <code>redirectTo<\/code> kurallar\u0131 i\u00e7in <code>pathMatch: 'full'<\/code> genellikle gereklidir.<br \/>\n*   <strong><code>redirectTo<\/code> D\u00f6ng\u00fcleri:<\/strong> Yanl\u0131\u015f <code>redirectTo<\/code> tan\u0131mlamalar\u0131 sonsuz y\u00f6nlendirme d\u00f6ng\u00fclerine yol a\u00e7abilir. \u00d6rne\u011fin, bir rotan\u0131n kendini veya kendisini i\u00e7eren bir rotay\u0131 y\u00f6nlendirmesi.<br \/>\n*   <strong><code>ActivatedRoute<\/code> Snapshot vs. Observable:<\/strong> Rota parametrelerine eri\u015firken, <code>route.snapshot.paramMap.get()<\/code> yaln\u0131zca bile\u015fen ilk y\u00fcklendi\u011finde parametreleri al\u0131r. E\u011fer ayn\u0131 bile\u015fen i\u00e7inde rota parametreleri de\u011fi\u015firse (\u00f6rn: <code>\/users\/1<\/code>&#8216;den <code>\/users\/2<\/code>&#8216;ye ge\u00e7i\u015f), bile\u015fenin g\u00fcncellenmesi i\u00e7in <code>route.paramMap.subscribe()<\/code> kullanarak bir g\u00f6zlemlenebilir nesneye abone olmak gerekir.<br \/>\n*   <strong>Mod\u00fcl \u0130\u00e7e Aktarma Hatalar\u0131:<\/strong> Tembel y\u00fckleme yaparken, <code>loadChildren<\/code> i\u00e7inde do\u011fru mod\u00fcl yolunu ve mod\u00fcl s\u0131n\u0131f ad\u0131n\u0131 belirtmek \u00e7ok \u00f6nemlidir (<code>.then(m => m.AdminModule)<\/code> k\u0131sm\u0131nda).<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p>Angular Router&#8217;da alt rotalar\u0131n tan\u0131mlanmas\u0131, karma\u015f\u0131k ve b\u00fcy\u00fck \u00f6l\u00e7ekli uygulamalar geli\u015ftirmek i\u00e7in vazge\u00e7ilmez bir ara\u00e7t\u0131r. Uygulaman\u0131n hiyerar\u015fik yap\u0131s\u0131n\u0131 URL&#8217;lere yans\u0131tarak hem geli\u015ftiriciler i\u00e7in kodun okunabilirli\u011fini ve y\u00f6netilebilirli\u011fini art\u0131r\u0131r hem de kullan\u0131c\u0131lar i\u00e7in daha sezgisel ve tutarl\u0131 bir navigasyon deneyimi sunar.<\/p>\n<p>Mod\u00fcler yap\u0131land\u0131rma, parametre ge\u00e7i\u015fi ve \u00f6zellikle tembel y\u00fckleme ile birle\u015fti\u011finde, alt rotalar Angular uygulamalar\u0131n\u0131n performans\u0131n\u0131 ve \u00f6l\u00e7eklenebilirli\u011fini \u00f6nemli \u00f6l\u00e7\u00fcde iyile\u015ftirir. Do\u011fru alt rota stratejileri benimsemek, Angular projenizin uzun vadede s\u00fcrd\u00fcr\u00fclebilirli\u011fini ve ba\u015far\u0131s\u0131n\u0131 garantileyecektir. Bu makalede ele al\u0131nan kavramlar\u0131 ve \u00f6rnekleri kullanarak, siz de Angular uygulamalar\u0131n\u0131zda g\u00fc\u00e7l\u00fc ve esnek y\u00f6nlendirme yap\u0131lar\u0131 olu\u015fturabilirsiniz.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Angular Router: Alt Rota Tan\u0131mlamas\u0131\nAngular uygulamalar\u0131, tek sayfal\u0131k uygulama (Single Page Application &#8211; SPA) mimarisinin g\u00fcc\u00fcn\u00fc kullanarak","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1488],"tags":[],"class_list":{"0":"post-34825","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-angular","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Angular Router: Alt Rota Tan\u0131mlamas\u0131 - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Angular Router: Alt Rota Tan\u0131mlamas\u0131\" \/>\n<meta property=\"og:description\" content=\"Angular Router: Alt Rota Tan\u0131mlamas\u0131 Angular uygulamalar\u0131, tek sayfal\u0131k uygulama (Single Page Application - SPA) mimarisinin g\u00fcc\u00fcn\u00fc kullanarak\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-22T10:40:40+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Angular Router: Alt Rota Tan\u0131mlamas\u0131\",\"datePublished\":\"2025-11-22T10:40:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\"},\"wordCount\":2186,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Angular\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\",\"name\":\"Angular Router: Alt Rota Tan\u0131mlamas\u0131 - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-11-22T10:40:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Angular Router: Alt Rota Tan\u0131mlamas\u0131\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Angular Router: Alt Rota Tan\u0131mlamas\u0131 - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/","og_locale":"tr_TR","og_type":"article","og_title":"Angular Router: Alt Rota Tan\u0131mlamas\u0131","og_description":"Angular Router: Alt Rota Tan\u0131mlamas\u0131 Angular uygulamalar\u0131, tek sayfal\u0131k uygulama (Single Page Application - SPA) mimarisinin g\u00fcc\u00fcn\u00fc kullanarak","og_url":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-11-22T10:40:40+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"14 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Angular Router: Alt Rota Tan\u0131mlamas\u0131","datePublished":"2025-11-22T10:40:40+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/"},"wordCount":2186,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Angular"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/","url":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/","name":"Angular Router: Alt Rota Tan\u0131mlamas\u0131 - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-11-22T10:40:40+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/angular-router-alt-rota-tanimlamasi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Angular Router: Alt Rota Tan\u0131mlamas\u0131"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=34825"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34825\/revisions"}],"predecessor-version":[{"id":34826,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34825\/revisions\/34826"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=34825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=34825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=34825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}