From 58717f44d2cb1834de1c4027af8b14e347b2b111 Mon Sep 17 00:00:00 2001
From: "jvanboxtel@wisc.edu" <jvanboxtel@wisc.edu>
Date: Tue, 23 Oct 2018 11:31:55 -0500
Subject: [PATCH] ROENROLL-1212

---
 angular.json                                  | 18 ++++++-------
 src/app/app.component.ts                      |  2 +-
 src/app/app.module.ts                         |  8 +++---
 src/app/app.routing.module.ts                 |  6 +++--
 .../degree-planner.component.css}             |  0
 .../degree-planner.component.html             |  3 +++
 .../degree-planner.component.spec.ts          | 24 ++++++++++++++++++
 .../degree-planner.component.ts               | 15 +++++++++++
 .../degree-planner/degree-planner.module.ts   | 17 +++++++++++++
 .../degree-planner.routing.module.ts          | 14 +++++++++++
 src/app/home/home.component.html              |  3 ---
 src/app/home/home.component.spec.ts           | 25 -------------------
 src/app/home/home.component.ts                | 15 -----------
 13 files changed, 91 insertions(+), 59 deletions(-)
 rename src/app/{home/home.component.scss => degree-planner/degree-planner.component.css} (100%)
 create mode 100644 src/app/degree-planner/degree-planner.component.html
 create mode 100644 src/app/degree-planner/degree-planner.component.spec.ts
 create mode 100644 src/app/degree-planner/degree-planner.component.ts
 create mode 100644 src/app/degree-planner/degree-planner.module.ts
 create mode 100644 src/app/degree-planner/degree-planner.routing.module.ts
 delete mode 100644 src/app/home/home.component.html
 delete mode 100644 src/app/home/home.component.spec.ts
 delete mode 100644 src/app/home/home.component.ts

diff --git a/angular.json b/angular.json
index da7b842..222a0fa 100644
--- a/angular.json
+++ b/angular.json
@@ -3,7 +3,7 @@
   "version": 1,
   "newProjectRoot": "projects",
   "projects": {
-    "ia-angular2-seed-project": {
+    "course-search-enroll-fe": {
       "root": "",
       "sourceRoot": "src",
       "projectType": "application",
@@ -13,7 +13,7 @@
         "build": {
           "builder": "@angular-devkit/build-angular:browser",
           "options": {
-            "outputPath": "dist/ia-angular2-seed-project",
+            "outputPath": "dist/course-search-enroll-fe",
             "index": "src/index.html",
             "main": "src/main.ts",
             "polyfills": "src/polyfills.ts",
@@ -58,18 +58,18 @@
         "serve": {
           "builder": "@angular-devkit/build-angular:dev-server",
           "options": {
-            "browserTarget": "ia-angular2-seed-project:build"
+            "browserTarget": "course-search-enroll-fe:build"
           },
           "configurations": {
             "production": {
-              "browserTarget": "ia-angular2-seed-project:build:production"
+              "browserTarget": "course-search-enroll-fe:build:production"
             }
           }
         },
         "extract-i18n": {
           "builder": "@angular-devkit/build-angular:extract-i18n",
           "options": {
-            "browserTarget": "ia-angular2-seed-project:build"
+            "browserTarget": "course-search-enroll-fe:build"
           }
         },
         "test": {
@@ -103,7 +103,7 @@
         }
       }
     },
-    "ia-angular2-seed-project-e2e": {
+    "course-search-enroll-fe-e2e": {
       "root": "e2e/",
       "projectType": "application",
       "architect": {
@@ -111,11 +111,11 @@
           "builder": "@angular-devkit/build-angular:protractor",
           "options": {
             "protractorConfig": "e2e/protractor.conf.js",
-            "devServerTarget": "ia-angular2-seed-project:serve"
+            "devServerTarget": "course-search-enroll-fe:serve"
           },
           "configurations": {
             "production": {
-              "devServerTarget": "ia-angular2-seed-project:serve:production"
+              "devServerTarget": "course-search-enroll-fe:serve:production"
             }
           }
         },
@@ -131,5 +131,5 @@
       }
     }
   },
-  "defaultProject": "ia-angular2-seed-project"
+  "defaultProject": "course-search-enroll-fe"
 }
\ No newline at end of file
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index a92a2b7..402edb6 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -10,7 +10,7 @@ export class AppComponent {
 }
 
 document.addEventListener('WebComponentsReady', function() {
-	let customEvent = new CustomEvent('myuw-login', {
+	const customEvent = new CustomEvent('myuw-login', {
 		detail: {
 			person: {
 				'firstName': 'Bucky'
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 712ca0e..08abb98 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -4,21 +4,21 @@ import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 
 import { AppRoutingModule } from './app.routing.module';
 import { AppComponent } from './app.component';
-import { HomeComponent } from './home/home.component';
 import { CoreModule } from './core/core.module';
 import { SharedModule } from './shared/shared.module';
+import { DegreePlannerModule } from './degree-planner/degree-planner.module';
 
 @NgModule({
 	imports: [
 		BrowserModule,
 		BrowserAnimationsModule,
-		AppRoutingModule,
+		DegreePlannerModule,
 		CoreModule,
-		SharedModule
+		SharedModule,
+		AppRoutingModule
 	],
 	declarations: [
 		AppComponent,
-		HomeComponent
 	],
 	providers: [],
 	bootstrap: [ AppComponent ],
diff --git a/src/app/app.routing.module.ts b/src/app/app.routing.module.ts
index 75003bf..c4fc6c3 100644
--- a/src/app/app.routing.module.ts
+++ b/src/app/app.routing.module.ts
@@ -2,10 +2,12 @@ import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
 
 import { AppComponent } from './app.component';
-import { HomeComponent } from './home/home.component';
 
 const routes: Routes = [
-	{ path: '', component: HomeComponent }
+	{
+		path: '',
+		loadChildren: './degree-planner/degree-planner.module#DegreePlannerModule'
+	}
 ];
 
 @NgModule({
diff --git a/src/app/home/home.component.scss b/src/app/degree-planner/degree-planner.component.css
similarity index 100%
rename from src/app/home/home.component.scss
rename to src/app/degree-planner/degree-planner.component.css
diff --git a/src/app/degree-planner/degree-planner.component.html b/src/app/degree-planner/degree-planner.component.html
new file mode 100644
index 0000000..3c50fc8
--- /dev/null
+++ b/src/app/degree-planner/degree-planner.component.html
@@ -0,0 +1,3 @@
+<p>
+	degree-planner works!
+</p>
diff --git a/src/app/degree-planner/degree-planner.component.spec.ts b/src/app/degree-planner/degree-planner.component.spec.ts
new file mode 100644
index 0000000..b68f7ee
--- /dev/null
+++ b/src/app/degree-planner/degree-planner.component.spec.ts
@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DegreePlannerComponent } from './degree-planner.component';
+
+describe('DegreePlannerComponent', () => {
+	let component: DegreePlannerComponent;
+	let fixture: ComponentFixture<DegreePlannerComponent>;
+
+	beforeEach(async(() => {
+		TestBed.configureTestingModule({
+			declarations: [ DegreePlannerComponent ]
+		}).compileComponents();
+	}));
+
+	beforeEach(() => {
+		fixture = TestBed.createComponent(DegreePlannerComponent);
+		component = fixture.componentInstance;
+		fixture.detectChanges();
+	});
+
+	it('should create', () => {
+		expect(component).toBeTruthy();
+	});
+});
diff --git a/src/app/degree-planner/degree-planner.component.ts b/src/app/degree-planner/degree-planner.component.ts
new file mode 100644
index 0000000..9331af1
--- /dev/null
+++ b/src/app/degree-planner/degree-planner.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+	selector: 'app-degree-planner',
+	templateUrl: './degree-planner.component.html',
+	styleUrls: ['./degree-planner.component.css']
+})
+export class DegreePlannerComponent implements OnInit {
+
+	constructor() { }
+
+	ngOnInit() {
+	}
+
+}
diff --git a/src/app/degree-planner/degree-planner.module.ts b/src/app/degree-planner/degree-planner.module.ts
new file mode 100644
index 0000000..b3cc02b
--- /dev/null
+++ b/src/app/degree-planner/degree-planner.module.ts
@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { DegreePlannerComponent } from './degree-planner.component';
+import { SharedModule } from '../shared/shared.module';
+import { DegreePlannerRoutingModule } from './degree-planner.routing.module';
+
+@NgModule({
+	imports: [
+		CommonModule,
+		SharedModule,
+		DegreePlannerRoutingModule
+	],
+	declarations: [
+		DegreePlannerComponent
+	]
+})
+export class DegreePlannerModule { }
diff --git a/src/app/degree-planner/degree-planner.routing.module.ts b/src/app/degree-planner/degree-planner.routing.module.ts
new file mode 100644
index 0000000..b2b56b7
--- /dev/null
+++ b/src/app/degree-planner/degree-planner.routing.module.ts
@@ -0,0 +1,14 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { DegreePlannerComponent } from './degree-planner.component';
+
+
+const routes: Routes = [
+	{ path: '', component: DegreePlannerComponent },
+];
+
+@NgModule({
+	imports: [RouterModule.forChild(routes)],
+	exports: [RouterModule]
+})
+export class DegreePlannerRoutingModule { }
diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html
deleted file mode 100644
index 6ec30b7..0000000
--- a/src/app/home/home.component.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<p>
-	home works!
-</p>
diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts
deleted file mode 100644
index 0763587..0000000
--- a/src/app/home/home.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { HomeComponent } from './home.component';
-
-describe('HomeComponent', () => {
-	let component: HomeComponent;
-	let fixture: ComponentFixture<HomeComponent>;
-
-	beforeEach(async(() => {
-	TestBed.configureTestingModule({
-		declarations: [ HomeComponent ]
-	})
-	.compileComponents();
-	}));
-
-	beforeEach(() => {
-	fixture = TestBed.createComponent(HomeComponent);
-	component = fixture.componentInstance;
-	fixture.detectChanges();
-	});
-
-	it('should create', () => {
-	expect(component).toBeTruthy();
-	});
-});
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
deleted file mode 100644
index 88d8df5..0000000
--- a/src/app/home/home.component.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-	selector: 'app-home',
-	templateUrl: './home.component.html',
-	styleUrls: ['./home.component.scss']
-})
-export class HomeComponent implements OnInit {
-
-	constructor() { }
-
-	ngOnInit() {
-	}
-
-}
-- 
GitLab