Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created 3 main components and configured routing #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion beginners-guide/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DashboardComponent } from './dashboard/dashboard.component';
import { GalleryComponent } from './gallery/gallery.component';
import { TableofcontentComponent } from './tableofcontent/tableofcontent.component';


const routes: Routes = [];
const routes: Routes = [
{path:'dashboard',component:DashboardComponent},
{path:'gallery',component:GalleryComponent},
{path:'tableofcomponent',component:TableofcontentComponent}
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
Expand Down
8 changes: 7 additions & 1 deletion beginners-guide/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { GalleryComponent } from './gallery/gallery.component';
import { TableofcontentComponent } from './tableofcontent/tableofcontent.component';

@NgModule({
declarations: [
AppComponent
AppComponent,
DashboardComponent,
GalleryComponent,
TableofcontentComponent
],
imports: [
BrowserModule,
Expand Down
Empty file.
1 change: 1 addition & 0 deletions beginners-guide/src/app/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>dashboard works!</p>
25 changes: 25 additions & 0 deletions beginners-guide/src/app/dashboard/dashboard.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DashboardComponent } from './dashboard.component';

describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions beginners-guide/src/app/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Empty file.
1 change: 1 addition & 0 deletions beginners-guide/src/app/gallery/gallery.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>gallery works!</p>
25 changes: 25 additions & 0 deletions beginners-guide/src/app/gallery/gallery.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { GalleryComponent } from './gallery.component';

describe('GalleryComponent', () => {
let component: GalleryComponent;
let fixture: ComponentFixture<GalleryComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GalleryComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(GalleryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions beginners-guide/src/app/gallery/gallery.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-gallery',
templateUrl: './gallery.component.html',
styleUrls: ['./gallery.component.css']
})
export class GalleryComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>tableofcontent works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { TableofcontentComponent } from './tableofcontent.component';

describe('TableofcontentComponent', () => {
let component: TableofcontentComponent;
let fixture: ComponentFixture<TableofcontentComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TableofcontentComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(TableofcontentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
15 changes: 15 additions & 0 deletions beginners-guide/src/app/tableofcontent/tableofcontent.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-tableofcontent',
templateUrl: './tableofcontent.component.html',
styleUrls: ['./tableofcontent.component.css']
})
export class TableofcontentComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}