ov-library- angular Fixed bug with RouterModule and updated dependencies

This commit is contained in:
CSantos 2019-04-24 15:56:29 +02:00
parent 9b1368d09f
commit 6a489cf070
7 changed files with 514 additions and 614 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "openvidu-library-angular",
"version": "2.5.0",
"version": "2.9.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
@ -11,41 +11,39 @@
},
"private": true,
"dependencies": {
"@angular/animations": "7.2.10",
"@angular/cdk": "7.3.5",
"@angular/common": "7.2.10",
"@angular/compiler": "7.2.10",
"@angular/core": "7.2.10",
"@angular/forms": "7.2.10",
"@angular/http": "7.2.10",
"@angular/material": "7.3.5",
"@angular/platform-browser": "7.2.10",
"@angular/platform-browser-dynamic": "7.2.10",
"@angular/router": "7.2.10",
"core-js": "2.6.5",
"@angular/animations": "7.2.14",
"@angular/common": "7.2.14",
"@angular/compiler": "7.2.14",
"@angular/core": "7.2.14",
"@angular/forms": "7.2.14",
"@angular/platform-browser": "7.2.14",
"@angular/platform-browser-dynamic": "7.2.14",
"@angular/router": "7.2.14",
"core-js": "2.5.4",
"openvidu-angular": "2.9.0",
"rxjs": "6.4.0",
"rxjs": "6.5.1",
"tslib": "1.9.3",
"zone.js": "0.9.0"
},
"devDependencies": {
"@angular/compiler-cli": "7.2.10",
"@angular-devkit/build-angular": "0.13.6",
"@angular/cli": "7.3.6",
"@angular/language-service": "7.2.10",
"@angular-devkit/build-angular": "0.13.8",
"@angular/cli": "7.3.8",
"@angular/compiler-cli": "7.2.14",
"@angular/language-service": "7.2.14",
"@types/node": "11.13.7",
"@types/jasmine": "3.3.12",
"@types/jasminewd2": "2.0.6",
"@types/node": "11.11.7",
"codelyzer": "5.0.0-beta.2",
"jasmine-core": "3.3.0",
"codelyzer": "5.0.0",
"jasmine-core": "3.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.0.1",
"karma": "4.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.5",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.0",
"protractor": "6.0.0",
"ts-node": "8.0.3",
"tslint": "5.14.0",
"typescript": "3.2.4"
"protractor": "5.4.2",
"ts-node": "8.1.0",
"tslint": "5.16.0",
"typescript": "3.2.2"
}
}

View File

@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

@ -1,6 +1,4 @@
<router-outlet></router-outlet>
<div *ngIf="!session" id="join">
<div id="join-dialog">
<h1>Join a video session</h1>

View File

@ -1,27 +1,35 @@
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', async(() => {
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));
it(`should have as title 'app'`, async(() => {
});
it(`should have as title 'pruebaAngular'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
}));
it('should render title in a h1 tag', async(() => {
expect(app.title).toEqual('pruebaAngular');
});
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
}));
expect(compiled.querySelector('h1').textContent).toContain('Welcome to pruebaAngular!');
});
});

View File

@ -1,10 +1,10 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { OpenviduSessionModule } from 'openvidu-angular';
import { FormsModule } from '@angular/forms';
import { OpenviduSessionModule } from 'openvidu-angular';
@NgModule({
declarations: [
@ -12,6 +12,7 @@ import { FormsModule } from '@angular/forms';
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
OpenviduSessionModule
],

View File

@ -9,4 +9,4 @@ if (environment.production) {
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
.catch(err => console.error(err));