├── src ├── assets │ ├── .gitkeep │ ├── header.jpeg │ ├── ecommerce.png │ ├── portfolio.jpg │ ├── topic-96.png │ ├── facebook-96.png │ ├── linkedin-96.png │ ├── twitter-96.png │ ├── managed-services.png │ └── services │ │ ├── seo-services.png │ │ └── web-development.jpg ├── app │ ├── app.component.css │ ├── components │ │ ├── home │ │ │ ├── home.component.css │ │ │ ├── home.component.spec.ts │ │ │ ├── home.component.html │ │ │ └── home.component.ts │ │ ├── about │ │ │ ├── about.component.css │ │ │ ├── about.component.html │ │ │ ├── about.component.spec.ts │ │ │ └── about.component.ts │ │ ├── contact │ │ │ ├── contact.component.css │ │ │ ├── contact.component.spec.ts │ │ │ ├── contact.component.html │ │ │ └── contact.component.ts │ │ ├── portfolio │ │ │ ├── portfolio.component.css │ │ │ ├── portfolio.component.html │ │ │ ├── portfolio.component.ts │ │ │ └── portfolio.component.spec.ts │ │ ├── services │ │ │ ├── services.component.css │ │ │ ├── services.component.spec.ts │ │ │ ├── services.component.html │ │ │ └── services.component.ts │ │ ├── footer │ │ │ ├── footer.component.ts │ │ │ ├── footer.component.css │ │ │ ├── footer.component.spec.ts │ │ │ └── footer.component.html │ │ └── header │ │ │ ├── header.component.html │ │ │ ├── header.component.spec.ts │ │ │ ├── header.component.ts │ │ │ └── header.component.css │ ├── app.component.html │ ├── app.component.ts │ ├── services │ │ ├── cosmic-service.service.spec.ts │ │ └── cosmic-service.service.ts │ ├── routing │ │ └── app-routing.module.ts │ ├── app.component.spec.ts │ └── app.module.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── tsconfig.app.json ├── tslint.json ├── tsconfig.spec.json ├── config │ └── config.ts ├── main.ts ├── browserslist ├── index.html ├── test.ts ├── karma.conf.js ├── styles.css └── polyfills.ts ├── e2e ├── tsconfig.e2e.json ├── src │ ├── app.po.ts │ └── app.e2e-spec.ts └── protractor.conf.js ├── .editorconfig ├── server.js ├── tsconfig.json ├── .gitignore ├── README.md ├── package.json ├── tslint.json └── angular.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/home/home.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/portfolio/portfolio.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/services/services.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/favicon.ico -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/assets/header.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/header.jpeg -------------------------------------------------------------------------------- /src/assets/ecommerce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/ecommerce.png -------------------------------------------------------------------------------- /src/assets/portfolio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/portfolio.jpg -------------------------------------------------------------------------------- /src/assets/topic-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/topic-96.png -------------------------------------------------------------------------------- /src/assets/facebook-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/facebook-96.png -------------------------------------------------------------------------------- /src/assets/linkedin-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/linkedin-96.png -------------------------------------------------------------------------------- /src/assets/twitter-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/twitter-96.png -------------------------------------------------------------------------------- /src/assets/managed-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/managed-services.png -------------------------------------------------------------------------------- /src/assets/services/seo-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/services/seo-services.png -------------------------------------------------------------------------------- /src/assets/services/web-development.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cosmicjs/angular-website-boilerplate/master/src/assets/services/web-development.jpg -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'angular-boilerplate'; 10 | } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/app/components/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-footer', 5 | templateUrl: './footer.component.html', 6 | styleUrls: ['./footer.component.css'] 7 | }) 8 | export class FooterComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/components/portfolio/portfolio.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |

Portfolio

6 |
7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 |
-------------------------------------------------------------------------------- /src/app/components/portfolio/portfolio.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-portfolio', 5 | templateUrl: './portfolio.component.html', 6 | styleUrls: ['./portfolio.component.css'] 7 | }) 8 | export class PortfolioComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/config/config.ts: -------------------------------------------------------------------------------- 1 | export const config = { 2 | 3 | bucket_name: "angular_boilerplate", 4 | bucket_slug: "angular-boilerplate", 5 | bucket_id: "5d21cf97e661c82fe6b78205", 6 | read_key: "dGdDziXsMPrgOCEOaPY4yZWb6uWyftdq9lPDSxwDfZsXhjjLr3", 7 | write_key: "BN1X435r0zT1BNlKGqRPBc6UQGTpYgtu95gopKrZ85B2PdFN9E", 8 | url: "https://api.cosmicjs.com/v1/" 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /src/app/services/cosmic-service.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CosmicServiceService } from './cosmic-service.service'; 4 | 5 | describe('CosmicServiceService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: CosmicServiceService = TestBed.get(CosmicServiceService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 | 14 |
15 | 16 |
17 |
18 |
-------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularBoilerplate 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | 2 | const express = require('express'); 3 | const http = require('http') 4 | const path = require('path'); 5 | 6 | const app = express(); 7 | 8 | app.use(express.static(path.join(__dirname, '/dist/angular-boilerplate/'))); 9 | 10 | app.get('*', (req, res) => { 11 | res.sendFile(path.join(__dirname + '/dist/angular-boilerplate/')); 12 | }); 13 | const port = process.env.PORT || 5000; 14 | app.set('port', port); 15 | 16 | const server = http.createServer(app); 17 | server.listen(port, () => console.log('running')); 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "target": "es5", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/components/footer/footer.component.css: -------------------------------------------------------------------------------- 1 | .text-style { 2 | font-weight: bold; 3 | text-align: center; 4 | } 5 | 6 | .jumbotron { 7 | /* background: url(/assets/header.jpeg) no-repeat center top; */ 8 | background: #363636e7; 9 | background-size:cover; 10 | border-radius: 0; 11 | margin-bottom:10px; 12 | } 13 | .jumbotron h1 { 14 | font-size: 3.5rem; 15 | font-weight: 300; 16 | line-height: 1.2; 17 | color: #fff; 18 | font-weight: bold; 19 | } 20 | .cntr{text-align: center} 21 | 22 | .margin 23 | { 24 | margin-top: 20px 25 | } -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /src/app/components/header/header.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

Angular 7 Boilerplate

6 |
7 | 8 | 9 |
10 |
    11 |
  • 12 | Home 13 |
  • 14 |
  • 15 | Services 16 |
  • 17 |
  • 18 | Portfolio 19 |
  • 20 |
  • 21 | About Us 22 |
  • 23 |
  • 24 | Contact Us 25 |
  • 26 |
27 |
28 | 29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to angular-boilerplate!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/components/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/about/about.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AboutComponent } from './about.component'; 4 | 5 | describe('AboutComponent', () => { 6 | let component: AboutComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AboutComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AboutComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FooterComponent } from './footer.component'; 4 | 5 | describe('FooterComponent', () => { 6 | let component: FooterComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FooterComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FooterComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/header/header.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HeaderComponent } from './header.component'; 4 | 5 | describe('HeaderComponent', () => { 6 | let component: HeaderComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HeaderComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HeaderComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ContactComponent } from './contact.component'; 4 | 5 | describe('ContactComponent', () => { 6 | let component: ContactComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ContactComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ContactComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/services/services.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ServicesComponent } from './services.component'; 4 | 5 | describe('ServicesComponent', () => { 6 | let component: ServicesComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ServicesComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ServicesComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/portfolio/portfolio.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { PortfolioComponent } from './portfolio.component'; 4 | 5 | describe('PortfolioComponent', () => { 6 | let component: PortfolioComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ PortfolioComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PortfolioComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'app-header', 6 | templateUrl: './header.component.html', 7 | styleUrls: ['./header.component.css'] 8 | }) 9 | export class HeaderComponent implements OnInit { 10 | 11 | constructor(private route: Router) { } 12 | 13 | ngOnInit() { 14 | } 15 | 16 | servicesCall() 17 | { 18 | this.route.navigate(['services']); 19 | } 20 | aboutCall() 21 | { 22 | this.route.navigate(['about']); 23 | } 24 | contactCall() 25 | { 26 | this.route.navigate(['contact']); 27 | } 28 | portfolioCall() 29 | { 30 | this.route.navigate(['portfolio']); 31 | } 32 | homeCall() 33 | { 34 | this.route.navigate(['']); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events.json 15 | speed-measure-plugin.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /src/app/components/services/services.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
7 |

Web Development


8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 |

SEO

16 |
17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /src/app/components/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { CosmicServiceService } from './../../services/cosmic-service.service'; 3 | 4 | @Component({ 5 | selector: 'app-about', 6 | templateUrl: './about.component.html', 7 | styleUrls: ['./about.component.css'] 8 | }) 9 | export class AboutComponent implements OnInit { 10 | title: any; 11 | content: any; 12 | showLoader: boolean = false; 13 | 14 | constructor(private cosmicService: CosmicServiceService) { } 15 | 16 | ngOnInit() { 17 | this.showLoader = true; 18 | this.cosmicService.getAboutUsData() 19 | .subscribe((res)=>{ 20 | var data = JSON.stringify(res); 21 | let datum = JSON.parse(data); 22 | this.title = datum.objects[0].title; 23 | this.content = datum.objects[0].content; 24 | this.showLoader = false; 25 | }) 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Angular Boilerplate 4 | Angular Boilerplate website powered by Angular 7 and [Cosmic JS](https://cosmicjs.com). 5 | 6 | ### [View the demo](https://cosmicjs.com/apps/angular-website-boilerplate) 7 | 8 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.9. 9 | 10 | # Get Started 11 | 12 | ## Running in Production Mode: 13 | 14 | ``` 15 | git clone https://github.com/cosmicjs/angular-website-boilerplate 16 | cd angular-website-boilerplate 17 | npm install 18 | npm run build 19 | npm start 20 | visit: http://localhost:5000/ 21 | ``` 22 | 23 | ## Development Mode 24 | 25 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 26 | -------------------------------------------------------------------------------- /src/app/components/header/header.component.css: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | /* background: url(/assets/header.jpeg) no-repeat center top; */ 3 | background: #363636e7; 4 | background-size:cover; 5 | border-radius: 0; 6 | margin-bottom:0; 7 | } 8 | .jumbotron h1 { 9 | font-size: 3.5rem; 10 | font-weight: 300; 11 | line-height: 1.2; 12 | color: #fff; 13 | font-weight: bold; 14 | } 15 | 16 | .cntr{text-align: center} 17 | 18 | ul { 19 | list-style-type: none; 20 | margin: 0; 21 | padding: 0; 22 | overflow: hidden; 23 | background-color: #333333; 24 | } 25 | 26 | li { 27 | float: left; 28 | } 29 | 30 | li span { 31 | display: block; 32 | color: white; 33 | text-align: center; 34 | padding: 16px; 35 | text-decoration: none; 36 | } 37 | 38 | li span:hover { 39 | background-color: #111111; 40 | cursor: pointer 41 | } -------------------------------------------------------------------------------- /src/app/components/home/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |
7 |
8 |

{{title}}

9 | 10 |
11 | 12 |
13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 |
26 | 27 |
28 |
29 |
30 | 31 |
32 | 33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /src/app/components/services/services.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { CosmicServiceService } from './../../services/cosmic-service.service'; 3 | 4 | @Component({ 5 | selector: 'app-services', 6 | templateUrl: './services.component.html', 7 | styleUrls: ['./services.component.css'] 8 | }) 9 | export class ServicesComponent implements OnInit { 10 | firstPara: any; 11 | secondPara: any; 12 | showLoader: boolean = false; 13 | constructor(private cosmicService: CosmicServiceService) { } 14 | 15 | ngOnInit() { 16 | this.showLoader = true; 17 | this.cosmicService.getServices() 18 | .subscribe((res)=>{ 19 | var data = JSON.stringify(res); 20 | let datum = JSON.parse(data); 21 | this.firstPara = datum.objects[0].metadata['para1']; 22 | this.secondPara = datum.objects[0].metadata['para2']; 23 | this.showLoader = false; 24 | }) 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/app/routing/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { HomeComponent } from './../components/home/home.component' 4 | import { ServicesComponent } from './../components/services/services.component' 5 | import { PortfolioComponent } from './../components/portfolio/portfolio.component' 6 | import { AboutComponent } from './../components/about/about.component' 7 | import { ContactComponent } from './../components/contact/contact.component' 8 | 9 | const routes: Routes = [ 10 | { path: '', component: HomeComponent }, 11 | { path: 'services', component: ServicesComponent }, 12 | { path: 'portfolio', component: PortfolioComponent }, 13 | { path: 'about', component: AboutComponent }, 14 | { path: 'contact', component: ContactComponent }, 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes)], 19 | exports: [RouterModule] 20 | }) 21 | export class AppRoutingModule { } 22 | -------------------------------------------------------------------------------- /src/app/components/footer/footer.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | Contact Us
7 | 975 River Side Road
8 | Email: testmail.com@test.com
9 | Phone:+1223445566 10 |
11 |
12 | Connect with us 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | 25 |
26 |

27 | Proudly Powered by Cosmic JS 28 |

29 |
-------------------------------------------------------------------------------- /src/app/components/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { CosmicServiceService } from './../../services/cosmic-service.service'; 3 | 4 | @Component({ 5 | selector: 'app-home', 6 | templateUrl: './home.component.html', 7 | styleUrls: ['./home.component.css'] 8 | }) 9 | export class HomeComponent implements OnInit { 10 | title: any; 11 | content: any; 12 | firstPara: any; 13 | secondPara: any; 14 | showLoader: boolean = false; 15 | 16 | constructor(private cosmicService: CosmicServiceService) { } 17 | 18 | ngOnInit() { 19 | this.showLoader = true; 20 | this.cosmicService.getHomeData() 21 | .subscribe((res)=>{ 22 | var data = JSON.stringify(res); 23 | let datum = JSON.parse(data) 24 | console.log(datum.objects[0].metadata['para1']) 25 | this.title = datum.objects[0].title; 26 | this.content = datum.objects[0].content; 27 | this.firstPara = datum.objects[0].metadata['para1']; 28 | this.secondPara = datum.objects[0].metadata['para2']; 29 | this.showLoader = false; 30 | }) 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/angular-boilerplate'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
7 | 8 | 9 |
10 | 11 |
12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 |
21 | 22 | {{submitMessage}} 23 |
24 |
25 |
26 |
27 | 28 | 29 |
30 |
31 |
-------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async(() => { 7 | TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.debugElement.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'angular-boilerplate'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.debugElement.componentInstance; 26 | expect(app.title).toEqual('angular-boilerplate'); 27 | }); 28 | 29 | it('should render title in a h1 tag', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.debugElement.nativeElement; 33 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to angular-boilerplate!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormBuilder, FormGroup, FormControl, Validators} from '@angular/forms'; 3 | import { CosmicServiceService } from './../../services/cosmic-service.service'; 4 | 5 | @Component({ 6 | selector: 'app-contact', 7 | templateUrl: './contact.component.html', 8 | styleUrls: ['./contact.component.css'] 9 | }) 10 | export class ContactComponent implements OnInit { 11 | contactForm: FormGroup; 12 | clientData: any; 13 | submitMessage: any = ''; 14 | showLoader: boolean = false; 15 | 16 | constructor(private fb: FormBuilder, private cosmicService: CosmicServiceService) 17 | { 18 | this.contactForm = this.fb.group({ 19 | 'name': [''], 20 | 'email': ['',[Validators.email, Validators.required ]], 21 | 'message': [''] 22 | }); 23 | } 24 | 25 | ngOnInit() { 26 | 27 | } 28 | 29 | contactUs() 30 | { 31 | this.showLoader = true; 32 | this.clientData = this.contactForm.value; 33 | this.cosmicService.sendMessage(this.clientData) 34 | .subscribe((res)=>{ 35 | this.showLoader = false; 36 | this.submitMessage = " Message sent successfully!" 37 | setTimeout(()=>{ this.submitMessage = '' }, 5000); 38 | }) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppRoutingModule } from './routing/app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import { HomeComponent } from './components/home/home.component'; 7 | import { HeaderComponent } from './components/header/header.component'; 8 | import { FooterComponent } from './components/footer/footer.component'; 9 | import { ServicesComponent } from './components/services/services.component'; 10 | import { PortfolioComponent } from './components/portfolio/portfolio.component'; 11 | import { AboutComponent } from './components/about/about.component'; 12 | import { ContactComponent } from './components/contact/contact.component'; 13 | import { HttpClientModule } from '@angular/common/http'; 14 | import { ReactiveFormsModule } from '@angular/forms'; 15 | 16 | @NgModule({ 17 | declarations: [ 18 | AppComponent, 19 | HomeComponent, 20 | HeaderComponent, 21 | FooterComponent, 22 | ServicesComponent, 23 | PortfolioComponent, 24 | AboutComponent, 25 | ContactComponent 26 | ], 27 | imports: [ 28 | BrowserModule, 29 | AppRoutingModule, 30 | HttpClientModule, 31 | ReactiveFormsModule 32 | ], 33 | providers: [], 34 | bootstrap: [AppComponent] 35 | }) 36 | export class AppModule { } 37 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | .margin-tp 3 | { 4 | margin-top: 40px 5 | } 6 | 7 | 8 | /* loader */ 9 | 10 | #loader { 11 | position: absolute; 12 | left: 0; 13 | top: 50%; 14 | z-index: 1; 15 | width: 150px; 16 | height: 150px; 17 | margin: -75px 0 0 -75px; 18 | border: 16px solid #f3f3f3; 19 | border-radius: 50%; 20 | border-top: 16px solid #0079dd; 21 | width: 120px; 22 | height: 120px; 23 | -webkit-animation: spin 2s linear infinite; 24 | animation: spin 2s linear infinite; 25 | margin: auto; 26 | right: 0; 27 | } 28 | 29 | .is-invisible { 30 | display: none; 31 | } 32 | 33 | .is-visible { 34 | display: block; 35 | } 36 | 37 | .overlay { 38 | position: fixed; 39 | width: 100%; 40 | height: 100%; 41 | top: 0; 42 | left: 0; 43 | right: 0; 44 | background-color: rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .logoutConfirmed { 48 | margin-right: 10px; 49 | } 50 | .confirm-float{ 51 | float:right 52 | } 53 | 54 | @-webkit-keyframes spin { 55 | 0% { 56 | -webkit-transform: rotate(0deg); 57 | } 58 | 100% { 59 | -webkit-transform: rotate(360deg); 60 | } 61 | } 62 | @keyframes spin { 63 | 0% { 64 | transform: rotate(0deg); 65 | } 66 | 100% { 67 | transform: rotate(360deg); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-boilerplate", 3 | "version": "0.0.0", 4 | "engines": { 5 | "npm": "5.7.1", 6 | "node": "9.5.0" 7 | }, 8 | "scripts": { 9 | "ng": "ng", 10 | "start": "node server.js", 11 | "build": "ng build --prod", 12 | "test": "ng test", 13 | "lint": "ng lint", 14 | "e2e": "ng e2e" 15 | }, 16 | "private": true, 17 | "dependencies": { 18 | "@angular/animations": "~7.2.0", 19 | "@angular/common": "~7.2.0", 20 | "@angular/compiler": "~7.2.0", 21 | "@angular/core": "~7.2.0", 22 | "@angular/forms": "~7.2.0", 23 | "@angular/platform-browser": "~7.2.0", 24 | "@angular/platform-browser-dynamic": "~7.2.0", 25 | "@angular/router": "~7.2.0", 26 | "core-js": "^2.5.4", 27 | "ngx-bootstrap": "^5.0.0", 28 | "rxjs": "~6.3.3", 29 | "tslib": "^1.9.0", 30 | "zone.js": "~0.8.26" 31 | }, 32 | "devDependencies": { 33 | "@angular-devkit/build-angular": "~0.13.0", 34 | "@angular/cli": "~7.3.9", 35 | "@angular/compiler-cli": "~7.2.0", 36 | "@angular/language-service": "~7.2.0", 37 | "@types/node": "~8.9.4", 38 | "@types/jasmine": "~2.8.8", 39 | "@types/jasminewd2": "~2.0.3", 40 | "codelyzer": "~4.5.0", 41 | "jasmine-core": "~2.99.1", 42 | "jasmine-spec-reporter": "~4.2.1", 43 | "karma": "~4.0.0", 44 | "karma-chrome-launcher": "~2.2.0", 45 | "karma-coverage-istanbul-reporter": "~2.0.1", 46 | "karma-jasmine": "~1.1.2", 47 | "karma-jasmine-html-reporter": "^0.2.2", 48 | "protractor": "~5.4.0", 49 | "ts-node": "~7.0.0", 50 | "tslint": "~5.11.0", 51 | "typescript": "~3.2.2" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/app/services/cosmic-service.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { config } from './../../config/config'; 3 | import { HttpClient } from '@angular/common/http'; 4 | 5 | 6 | @Injectable({ 7 | providedIn: 'root' 8 | }) 9 | export class CosmicServiceService { 10 | 11 | constructor(private _http: HttpClient) { } 12 | 13 | //getting data for home component 14 | getHomeData() 15 | { 16 | return this._http.get(config.url + config.bucket_slug + "/object-type/homes", { 17 | params: { 18 | read_key: config.read_key, 19 | } 20 | }) 21 | } 22 | 23 | // get data of services 24 | getServices() 25 | { 26 | return this._http.get(config.url + config.bucket_slug + "/object-type/services", { 27 | params: { 28 | read_key: config.read_key, 29 | } 30 | }) 31 | } 32 | 33 | //about us data 34 | getAboutUsData() 35 | { 36 | return this._http.get(config.url + config.bucket_slug + "/object-type/abouts", { 37 | params: { 38 | read_key: config.read_key, 39 | } 40 | }) 41 | } 42 | 43 | //send message 44 | sendMessage(data: any) 45 | { 46 | return this._http.post(config.url + config.bucket_slug + "/add-object/",{ 47 | title: data.email, content: data.message, slug: data.name, type_slug: 'clients', write_key: config.write_key, 48 | 49 | metafields: [ 50 | { 51 | key: "name", 52 | type: "text", 53 | value: data.name 54 | }, 55 | { 56 | key: "email", 57 | type: "text", 58 | value: data.email 59 | } 60 | ] 61 | 62 | }) 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rulesDirectory": [ 4 | "codelyzer" 5 | ], 6 | "rules": { 7 | "array-type": false, 8 | "arrow-parens": false, 9 | "deprecation": { 10 | "severity": "warn" 11 | }, 12 | "import-blacklist": [ 13 | true, 14 | "rxjs/Rx" 15 | ], 16 | "interface-name": false, 17 | "max-classes-per-file": false, 18 | "max-line-length": [ 19 | true, 20 | 140 21 | ], 22 | "member-access": false, 23 | "member-ordering": [ 24 | true, 25 | { 26 | "order": [ 27 | "static-field", 28 | "instance-field", 29 | "static-method", 30 | "instance-method" 31 | ] 32 | } 33 | ], 34 | "no-consecutive-blank-lines": false, 35 | "no-console": [ 36 | true, 37 | "debug", 38 | "info", 39 | "time", 40 | "timeEnd", 41 | "trace" 42 | ], 43 | "no-empty": false, 44 | "no-inferrable-types": [ 45 | true, 46 | "ignore-params" 47 | ], 48 | "no-non-null-assertion": true, 49 | "no-redundant-jsdoc": true, 50 | "no-switch-case-fall-through": true, 51 | "no-use-before-declare": true, 52 | "no-var-requires": false, 53 | "object-literal-key-quotes": [ 54 | true, 55 | "as-needed" 56 | ], 57 | "object-literal-sort-keys": false, 58 | "ordered-imports": false, 59 | "quotemark": [ 60 | true, 61 | "single" 62 | ], 63 | "trailing-comma": false, 64 | "no-output-on-prefix": true, 65 | "use-input-property-decorator": true, 66 | "use-output-property-decorator": true, 67 | "use-host-property-decorator": true, 68 | "no-input-rename": true, 69 | "no-output-rename": true, 70 | "use-life-cycle-interface": true, 71 | "use-pipe-transform-interface": true, 72 | "component-class-suffix": true, 73 | "directive-class-suffix": true 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags.ts'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular-boilerplate": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "prefix": "app", 11 | "schematics": {}, 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/angular-boilerplate", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "src/tsconfig.app.json", 21 | "assets": [ 22 | "src/favicon.ico", 23 | "src/assets" 24 | ], 25 | "styles": [ 26 | "src/styles.css" 27 | ], 28 | "scripts": [], 29 | "es5BrowserSupport": true 30 | }, 31 | "configurations": { 32 | "production": { 33 | "fileReplacements": [ 34 | { 35 | "replace": "src/environments/environment.ts", 36 | "with": "src/environments/environment.prod.ts" 37 | } 38 | ], 39 | "optimization": true, 40 | "outputHashing": "all", 41 | "sourceMap": false, 42 | "extractCss": true, 43 | "namedChunks": false, 44 | "aot": true, 45 | "extractLicenses": true, 46 | "vendorChunk": false, 47 | "buildOptimizer": true, 48 | "budgets": [ 49 | { 50 | "type": "initial", 51 | "maximumWarning": "2mb", 52 | "maximumError": "5mb" 53 | } 54 | ] 55 | } 56 | } 57 | }, 58 | "serve": { 59 | "builder": "@angular-devkit/build-angular:dev-server", 60 | "options": { 61 | "browserTarget": "angular-boilerplate:build" 62 | }, 63 | "configurations": { 64 | "production": { 65 | "browserTarget": "angular-boilerplate:build:production" 66 | } 67 | } 68 | }, 69 | "extract-i18n": { 70 | "builder": "@angular-devkit/build-angular:extract-i18n", 71 | "options": { 72 | "browserTarget": "angular-boilerplate:build" 73 | } 74 | }, 75 | "test": { 76 | "builder": "@angular-devkit/build-angular:karma", 77 | "options": { 78 | "main": "src/test.ts", 79 | "polyfills": "src/polyfills.ts", 80 | "tsConfig": "src/tsconfig.spec.json", 81 | "karmaConfig": "src/karma.conf.js", 82 | "styles": [ 83 | "src/styles.css" 84 | ], 85 | "scripts": [], 86 | "assets": [ 87 | "src/favicon.ico", 88 | "src/assets" 89 | ] 90 | } 91 | }, 92 | "lint": { 93 | "builder": "@angular-devkit/build-angular:tslint", 94 | "options": { 95 | "tsConfig": [ 96 | "src/tsconfig.app.json", 97 | "src/tsconfig.spec.json" 98 | ], 99 | "exclude": [ 100 | "**/node_modules/**" 101 | ] 102 | } 103 | } 104 | } 105 | }, 106 | "angular-boilerplate-e2e": { 107 | "root": "e2e/", 108 | "projectType": "application", 109 | "prefix": "", 110 | "architect": { 111 | "e2e": { 112 | "builder": "@angular-devkit/build-angular:protractor", 113 | "options": { 114 | "protractorConfig": "e2e/protractor.conf.js", 115 | "devServerTarget": "angular-boilerplate:serve" 116 | }, 117 | "configurations": { 118 | "production": { 119 | "devServerTarget": "angular-boilerplate:serve:production" 120 | } 121 | } 122 | }, 123 | "lint": { 124 | "builder": "@angular-devkit/build-angular:tslint", 125 | "options": { 126 | "tsConfig": "e2e/tsconfig.e2e.json", 127 | "exclude": [ 128 | "**/node_modules/**" 129 | ] 130 | } 131 | } 132 | } 133 | } 134 | }, 135 | "defaultProject": "angular-boilerplate" 136 | } --------------------------------------------------------------------------------