<?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>lazy - Bipon's Diary</title>
	<atom:link href="https://biponnotes.iglyphic.com/tag/lazy/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>Thu, 02 Jan 2020 10:36:19 +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>Lazy loading modules</title>
		<link>https://biponnotes.iglyphic.com/lazy-loading-modules/</link>
					<comments>https://biponnotes.iglyphic.com/lazy-loading-modules/#respond</comments>
		
		<dc:creator><![CDATA[bipon68]]></dc:creator>
		<pubDate>Thu, 02 Jan 2020 10:36:13 +0000</pubDate>
				<category><![CDATA[Angular Router]]></category>
		<category><![CDATA[lazy]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[routes]]></category>
		<guid isPermaLink="false">https://bipon.me/?p=301</guid>

					<description><![CDATA[<p>Step 1: Create a user folder then create a component user.profile.component.ts user.module.ts user.routes.ts routes.ts nav-bar.component.html</p>
<p>The post <a href="https://biponnotes.iglyphic.com/lazy-loading-modules/">Lazy loading modules</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Step 1: Create a user folder then create a component</p>



<p>user.profile.component.ts </p>



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

@Component({
  template: `
    &lt;h1>Edit Your Profile&lt;/h1>
    &lt;hr>
    &lt;div class="col-md-6">
      &lt;h3>[Edit profile form will go here]&lt;/h3>
      &lt;br />
      &lt;br />
      &lt;button type="submit" class="btn btn-primary">Save&lt;/button>
      &lt;button type="button" class="btn btn-default">Cancel&lt;/button>
    &lt;/div>
  `,
})
export class ProfileComponent {
       
}</code></pre>



<p>user.module.ts</p>



<pre class="wp-block-code"><code>import { ProfileComponent } from './profile.component';
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { RouterModule } from '@angular/router'
import { userRoutes } from './user.routes'

@NgModule({
    imports: [
        CommonModule,
        RouterModule.forChild(userRoutes)
    ],
    declarations: [
        ProfileComponent
    ],
    providers: [

    ]

})
export class UserModule{

}</code></pre>



<p>user.routes.ts</p>



<pre class="wp-block-code"><code>import { ProfileComponent } from './profile.component';


export const userRoutes = [
    { path: 'profile', component: ProfileComponent}
]</code></pre>



<p>routes.ts</p>



<pre class="wp-block-code"><code>import { Routes } from '@angular/router'
import { CreateEventComponent } from './app/events/event-details/create-event.component';
import { EventDetailsComponent } from './app/events/event-details/event-details.component';
import { EventListComponent } from './app/events/event-list.component';
import { EventRouteActivator } from './app/events/event-details/event-route.activator.service';
import { EventListResolver } from './app/events/shared/events-list-resolver.service';
import { Error404Component } from './app/errors/404.component';

export const appRoutes:Routes = [
    { path: 'events/new', component: CreateEventComponent, canDeactivate: ['canDeactivateCreateEvent']},
    { path: 'events', component: EventListComponent },
    { path: 'events/:id', component: EventDetailsComponent, canActivate: [EventRouteActivator] },   
    { path: '404', component: Error404Component }, 
    { path: '', redirectTo: '/events', pathMatch: 'full' },
    { path: 'user', loadChildren: './app/user/user.module#UserModule' }
]</code></pre>



<figure class="wp-block-image"><img width="953" height="84" src="https://i2.wp.com/bipon.me/wp-content/uploads/2020/01/5.png?resize=953%2C84&#038;ssl=1" alt="" class="wp-image-302" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/5.png?w=953&amp;ssl=1 953w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/5.png?resize=300%2C26&amp;ssl=1 300w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/5.png?resize=768%2C68&amp;ssl=1 768w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/5.png?resize=750%2C66&amp;ssl=1 750w" sizes="(max-width: 953px) 100vw, 953px" data-recalc-dims="1" /></figure>



<p>nav-bar.component.html</p>



<pre class="wp-block-code"><code>&lt;div class="navbar navbar-default">
    &lt;div class="container-fluid">
      &lt;div class="navbar-header">
        &lt;a class="navbar-brand" >ngEvents&lt;/a>
      &lt;/div>
  
      &lt;div class="collapse navbar-collapse">
        &lt;ul class="nav navbar-nav">
          &lt;li>
            &lt;a [routerLink]="['/events']" routerLinkActive="active"
            [routerLinkActiveOptions]="{exact:true}">All Events&lt;/a>
          &lt;/li>
          &lt;li>&lt;a [routerLink]="['/events/new']" routerLinkActive="active">Create Event&lt;/a>&lt;/li>
          &lt;li class="dropdown">
            &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" >
              Events
              &lt;span class="caret">&lt;/span>
            &lt;/a>
            &lt;ul class="dropdown-menu">
              &lt;li >
                &lt;a href="">Angular Connect&lt;/a>
              &lt;/li>
            &lt;/ul>
          &lt;/li>
        &lt;/ul>
        &lt;div class="navbar-header navbar-right">
          &lt;ul class="nav navbar-nav">
            &lt;li>
              &lt;a [routerLink]="['user/profile']">Welcome John&lt;/a>
            &lt;/li>
          &lt;/ul>
        &lt;/div>
        &lt;form id="searchForm"  class="navbar-form navbar-right"  >
          &lt;div class="form-group">
            &lt;input type="text" class="form-control" placeholder="Search Sessions" >
          &lt;/div>
          &lt;button class="btn btn-default" >
            Search
          &lt;/button>
        &lt;/form>
      &lt;/div>
    &lt;/div>
  &lt;/div></code></pre>



<figure class="wp-block-image"><img loading="lazy" width="809" height="139" src="https://i0.wp.com/bipon.me/wp-content/uploads/2020/01/6.png?resize=809%2C139&#038;ssl=1" alt="" class="wp-image-303" srcset="https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/6.png?w=809&amp;ssl=1 809w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/6.png?resize=300%2C52&amp;ssl=1 300w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/6.png?resize=768%2C132&amp;ssl=1 768w, https://i0.wp.com/biponnotes.iglyphic.com/wp-content/uploads/2020/01/6.png?resize=750%2C129&amp;ssl=1 750w" sizes="(max-width: 809px) 100vw, 809px" data-recalc-dims="1" /><figcaption>added router link</figcaption></figure><p>The post <a href="https://biponnotes.iglyphic.com/lazy-loading-modules/">Lazy loading modules</a> first appeared on <a href="https://biponnotes.iglyphic.com">Bipon's Diary</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://biponnotes.iglyphic.com/lazy-loading-modules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">301</post-id>	</item>
	</channel>
</rss>
