浏览代码

Changed the notes details component to video-notes and created a new component called chapter-notes

master
kj1352 5 年前
父节点
当前提交
c000d2686b
共有 11 个文件被更改,包括 61 次插入18 次删除
  1. +2
    -2
      src/app/app-routing.module.ts
  2. +4
    -2
      src/app/app.module.ts
  3. +1
    -0
      src/app/tabs/courses/chapter-notes/chapter-notes.component.html
  4. +0
    -0
      src/app/tabs/courses/chapter-notes/chapter-notes.component.scss
  5. +6
    -6
      src/app/tabs/courses/chapter-notes/chapter-notes.component.spec.ts
  6. +15
    -0
      src/app/tabs/courses/chapter-notes/chapter-notes.component.ts
  7. +3
    -3
      src/app/tabs/courses/video-chapter/video-chapter.component.html
  8. +0
    -0
      src/app/tabs/courses/video-chapter/video-notes/video-notes.component.html
  9. +0
    -0
      src/app/tabs/courses/video-chapter/video-notes/video-notes.component.scss
  10. +25
    -0
      src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts
  11. +5
    -5
      src/app/tabs/courses/video-chapter/video-notes/video-notes.component.ts

+ 2
- 2
src/app/app-routing.module.ts 查看文件

@@ -4,7 +4,7 @@ import { WelcomeComponent } from './welcome/welcome.component';
import { TabsComponent } from './tabs/tabs.component'; import { TabsComponent } from './tabs/tabs.component';
import { DetailsComponent } from './tabs/courses/details/details.component'; import { DetailsComponent } from './tabs/courses/details/details.component';
import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component'; import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component';
import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-details.component';
import { VideoNotesComponent } from './tabs/courses/video-chapter/video-notes/video-notes.component';
import { CalendarComponent } from './calendar/calendar.component'; import { CalendarComponent } from './calendar/calendar.component';
import { AttendanceComponent } from './tabs/more/attendance/attendance.component'; import { AttendanceComponent } from './tabs/more/attendance/attendance.component';
import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component'; import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component';
@@ -17,7 +17,7 @@ const routes: Routes = [
{ component: DetailsComponent, path: 'course-details' }, { component: DetailsComponent, path: 'course-details' },
{ component: DetailsComponent, path: 'course-details/:heading' }, { component: DetailsComponent, path: 'course-details/:heading' },
{ component: VideoChapterComponent, path: 'video-chapter/:heading' }, { component: VideoChapterComponent, path: 'video-chapter/:heading' },
{ component: NotesDetailsComponent, path: 'notes-details/:heading' },
{ component: VideoNotesComponent, path: 'video-notes/:heading' },
{ component: CalendarComponent, path: 'calendar' }, { component: CalendarComponent, path: 'calendar' },
{ component: AttendanceComponent, path: 'attendance'}, { component: AttendanceComponent, path: 'attendance'},
{ component: ForumPageComponent, path: 'forum'}, { component: ForumPageComponent, path: 'forum'},


+ 4
- 2
src/app/app.module.ts 查看文件

@@ -15,7 +15,6 @@ import { ReportsComponent } from './tabs/reports/reports.component';
import { MoreComponent } from './tabs/more/more.component'; import { MoreComponent } from './tabs/more/more.component';
import { DetailsComponent } from './tabs/courses/details/details.component'; import { DetailsComponent } from './tabs/courses/details/details.component';
import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component'; import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component';
import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-details.component';
import { ServiceWorkerModule } from '@angular/service-worker'; import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment'; import { environment } from '../environments/environment';
import { CalendarComponent } from './calendar/calendar.component'; import { CalendarComponent } from './calendar/calendar.component';
@@ -23,6 +22,8 @@ import { AttendanceComponent } from './tabs/more/attendance/attendance.component
import { ForumComponent } from './reusable-components/forum/forum.component'; import { ForumComponent } from './reusable-components/forum/forum.component';
import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component'; import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component';
import { ConfirmationPopupComponent } from './reusable-components/confirmation-popup/confirmation-popup.component'; import { ConfirmationPopupComponent } from './reusable-components/confirmation-popup/confirmation-popup.component';
import { VideoNotesComponent } from './tabs/courses/video-chapter/video-notes/video-notes.component';
import { ChapterNotesComponent } from './tabs/courses/chapter-notes/chapter-notes.component';


@NgModule({ @NgModule({
declarations: [ declarations: [
@@ -35,12 +36,13 @@ import { ConfirmationPopupComponent } from './reusable-components/confirmation-p
MoreComponent, MoreComponent,
DetailsComponent, DetailsComponent,
VideoChapterComponent, VideoChapterComponent,
NotesDetailsComponent,
CalendarComponent, CalendarComponent,
AttendanceComponent, AttendanceComponent,
ForumComponent, ForumComponent,
ForumPageComponent, ForumPageComponent,
ConfirmationPopupComponent, ConfirmationPopupComponent,
VideoNotesComponent,
ChapterNotesComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,


+ 1
- 0
src/app/tabs/courses/chapter-notes/chapter-notes.component.html 查看文件

@@ -0,0 +1 @@
<p>chapter-notes works!</p>

+ 0
- 0
src/app/tabs/courses/chapter-notes/chapter-notes.component.scss 查看文件


src/app/tabs/courses/notes-details/notes-details.component.spec.ts → src/app/tabs/courses/chapter-notes/chapter-notes.component.spec.ts 查看文件

@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';


import { NotesDetailsComponent } from './notes-details.component';
import { ChapterNotesComponent } from './chapter-notes.component';


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


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


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

+ 15
- 0
src/app/tabs/courses/chapter-notes/chapter-notes.component.ts 查看文件

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-chapter-notes',
templateUrl: './chapter-notes.component.html',
styleUrls: ['./chapter-notes.component.scss']
})
export class ChapterNotesComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}

+ 3
- 3
src/app/tabs/courses/video-chapter/video-chapter.component.html 查看文件

@@ -60,7 +60,7 @@
</ul> </ul>


<ul class="notes-list" *ngIf="selectedSegment === 'notes'"> <ul class="notes-list" *ngIf="selectedSegment === 'notes'">
<li [routerLink]="['/notes-details', '0']">
<li [routerLink]="['/video-notes', '0']">
<div class="content"> <div class="content">
<label> Notes 1 </label> <label> Notes 1 </label>
<p> <p>
@@ -73,7 +73,7 @@
<svg-icon [applyClass]="true" class="icon arrow" src="assets/custom-icons/down-arrow.svg"></svg-icon> <svg-icon [applyClass]="true" class="icon arrow" src="assets/custom-icons/down-arrow.svg"></svg-icon>
</li> </li>


<li [routerLink]="['/notes-details', '1']">
<li [routerLink]="['/video-notes', '1']">
<div class="content"> <div class="content">
<label> Notes 2 </label> <label> Notes 2 </label>
<p> <p>
@@ -86,7 +86,7 @@
<svg-icon [applyClass]="true" class="icon arrow" src="assets/custom-icons/down-arrow.svg"></svg-icon> <svg-icon [applyClass]="true" class="icon arrow" src="assets/custom-icons/down-arrow.svg"></svg-icon>
</li> </li>


<li [routerLink]="['/notes-details', '2']">
<li [routerLink]="['/video-notes', '2']">
<div class="content"> <div class="content">
<label> Notes 3 </label> <label> Notes 3 </label>
<p> <p>


src/app/tabs/courses/notes-details/notes-details.component.html → src/app/tabs/courses/video-chapter/video-notes/video-notes.component.html 查看文件


src/app/tabs/courses/notes-details/notes-details.component.scss → src/app/tabs/courses/video-chapter/video-notes/video-notes.component.scss 查看文件


+ 25
- 0
src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts 查看文件

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { VideoNotesComponent } from './video-notes.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});

src/app/tabs/courses/notes-details/notes-details.component.ts → src/app/tabs/courses/video-chapter/video-notes/video-notes.component.ts 查看文件

@@ -6,12 +6,12 @@ import { NgxSiemaOptions, NgxSiemaService } from 'ngx-siema';




@Component({ @Component({
selector: 'app-notes-details',
templateUrl: './notes-details.component.html',
styleUrls: ['./notes-details.component.scss']
selector: 'app-video-notes',
templateUrl: './video-notes.component.html',
styleUrls: ['./video-notes.component.scss']
}) })
export class NotesDetailsComponent implements OnInit {
heading: number;
export class VideoNotesComponent implements OnInit {
heading: number;
routeSubscription: Subscription; routeSubscription: Subscription;


options: NgxSiemaOptions = { options: NgxSiemaOptions = {