Angular src restructured as modular as per angular official guidelines, .travis.yml support added for node 12
This commit is contained in:
1
src/app/shared/components/index.ts
Normal file
1
src/app/shared/components/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './page-not-found/page-not-found.component';
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
page-not-found works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageNotFoundComponent } from './page-not-found.component';
|
||||
|
||||
describe('PageNotFoundComponent', () => {
|
||||
let component: PageNotFoundComponent;
|
||||
let fixture: ComponentFixture<PageNotFoundComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PageNotFoundComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageNotFoundComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-not-found',
|
||||
templateUrl: './page-not-found.component.html',
|
||||
styleUrls: ['./page-not-found.component.scss']
|
||||
})
|
||||
export class PageNotFoundComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
}
|
||||
1
src/app/shared/directives/index.ts
Normal file
1
src/app/shared/directives/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './webview/webview.directive';
|
||||
@@ -0,0 +1,8 @@
|
||||
import { WebviewDirective } from './webview.directive';
|
||||
|
||||
describe('WebviewDirective', () => {
|
||||
it('should create an instance', () => {
|
||||
const directive = new WebviewDirective();
|
||||
expect(directive).toBeTruthy();
|
||||
});
|
||||
});
|
||||
8
src/app/shared/directives/webview/webview.directive.ts
Normal file
8
src/app/shared/directives/webview/webview.directive.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[webview]'
|
||||
})
|
||||
export class WebviewDirective {
|
||||
constructor() {}
|
||||
}
|
||||
14
src/app/shared/shared.module.ts
Normal file
14
src/app/shared/shared.module.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { PageNotFoundComponent } from './components/';
|
||||
import { WebviewDirective } from './directives/';
|
||||
|
||||
@NgModule({
|
||||
declarations: [PageNotFoundComponent, WebviewDirective],
|
||||
imports: [CommonModule, TranslateModule],
|
||||
exports: [TranslateModule, WebviewDirective]
|
||||
})
|
||||
export class SharedModule {}
|
||||
Reference in New Issue
Block a user