├── .gitignore ├── LICENSE.txt ├── README.md ├── angular.json ├── browserslist ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── screenshot.png ├── src ├── app │ ├── apollo │ │ └── queries │ │ │ ├── article │ │ │ ├── article.js │ │ │ └── articles.js │ │ │ └── category │ │ │ ├── articles.js │ │ │ └── categories.js │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── article │ │ ├── article.component.css │ │ ├── article.component.html │ │ ├── article.component.spec.ts │ │ └── article.component.ts │ ├── articles │ │ ├── articles.component.css │ │ ├── articles.component.html │ │ ├── articles.component.spec.ts │ │ └── articles.component.ts │ ├── category │ │ ├── category.component.css │ │ ├── category.component.html │ │ ├── category.component.spec.ts │ │ └── category.component.ts │ ├── graphql.module.ts │ └── nav │ │ ├── nav.component.css │ │ ├── nav.component.html │ │ ├── nav.component.spec.ts │ │ └── nav.component.ts ├── assets │ └── .gitkeep ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.css └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json ├── tslint.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | ############################ 2 | # OS X 3 | ############################ 4 | 5 | .DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | Icon 9 | .Spotlight-V100 10 | .Trashes 11 | ._* 12 | 13 | 14 | ############################ 15 | # Linux 16 | ############################ 17 | 18 | *~ 19 | 20 | 21 | ############################ 22 | # Windows 23 | ############################ 24 | 25 | Thumbs.db 26 | ehthumbs.db 27 | Desktop.ini 28 | $RECYCLE.BIN/ 29 | *.cab 30 | *.msi 31 | *.msm 32 | *.msp 33 | 34 | 35 | ############################ 36 | # Packages 37 | ############################ 38 | 39 | *.7z 40 | *.csv 41 | *.dat 42 | *.dmg 43 | *.gz 44 | *.iso 45 | *.jar 46 | *.rar 47 | *.tar 48 | *.com 49 | *.class 50 | *.dll 51 | *.exe 52 | *.o 53 | *.seed 54 | *.so 55 | *.swo 56 | *.swp 57 | *.swn 58 | *.swm 59 | *.out 60 | *.pid 61 | 62 | 63 | ############################ 64 | # Logs and databases 65 | ############################ 66 | 67 | .tmp 68 | *.log 69 | *.sql 70 | *.sqlite 71 | *.sqlite3 72 | 73 | 74 | ############################ 75 | # Misc. 76 | ############################ 77 | 78 | *# 79 | ssl 80 | .idea 81 | nbproject 82 | public/uploads/* 83 | !public/uploads/.gitkeep 84 | 85 | ############################ 86 | # Node.js 87 | ############################ 88 | 89 | lib-cov 90 | lcov.info 91 | pids 92 | logs 93 | results 94 | node_modules 95 | .node_history 96 | 97 | 98 | ############################ 99 | # Tests 100 | ############################ 101 | 102 | testApp 103 | coverage 104 | 105 | ############################ 106 | # Strapi 107 | ############################ 108 | 109 | exports 110 | .cache 111 | build 112 | 113 | # Custom 114 | 115 | .vscode 116 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Strapi Starter Angular Blog 2 | 3 | > **Warning :warning:** 4 | > 5 | > This starter relies on the **[strapi/strapi-legacy-blog](https://github.com/strapi/strapi-legacy-blog)** repository, which is deprecated. 6 | 7 | Angular starter for creating a blog with Strapi. 8 | 9 | This starter allows you to try Strapi with Angular with the example of a simple blog. It is fully customizable and due to the fact that it is open source, fully open to contributions. Do not hesitate to add new features etc ... 10 | 11 | You may want to know how to develop such a starter by your own! This starter is actually the result of this [tutorial](https://strapi.io/blog/build-a-blog-with-angular-js-strapi-and-apollo) 12 | 13 | ![screenshot image](/screenshot.png) 14 | 15 | ## Features 16 | 17 | - 2 Content types: Article, Category 18 | - 2 Created articles 19 | - 3 Created categories 20 | - Permissions set to `true` for article and category 21 | - Responsive design using UIkit 22 | 23 | Pages: 24 | 25 | - "/" display every articles 26 | - "/article/:id" display one article 27 | - "/category/:id" display articles depending on the category 28 | 29 | ## Getting started 30 | 31 | **Backend** 32 | 33 | See full instructions [here](https://github.com/strapi/strapi-legacy-blog) 34 | 35 | **Frontend** 36 | 37 | ```bash 38 | git clone https://github.com/strapi/strapi-starter-angular-blog.git 39 | cd strapi-starter-angular-blog 40 | ``` 41 | 42 | #### Start the frontend server 43 | 44 | ```bash 45 | # Using yarn 46 | yarn install 47 | yarn develop 48 | 49 | # Using npm 50 | npm install 51 | npm run develop 52 | ``` 53 | 54 | Angular server is running here => [http://localhost:4200](http://localhost:4200) 55 | 56 | Enjoy this starter! 57 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "frontend": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/frontend", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "tsconfig.app.json", 21 | "aot": false, 22 | "assets": [ 23 | "src/favicon.ico", 24 | "src/assets" 25 | ], 26 | "styles": [ 27 | "src/styles.css" 28 | ], 29 | "scripts": [ 30 | "node_modules/jquery/dist/jquery.min.js", 31 | "node_modules/uikit/dist/js/uikit.min.js", 32 | "node_modules/uikit/dist/js/uikit-icons.min.js", 33 | ] 34 | }, 35 | "configurations": { 36 | "production": { 37 | "fileReplacements": [ 38 | { 39 | "replace": "src/environments/environment.ts", 40 | "with": "src/environments/environment.prod.ts" 41 | } 42 | ], 43 | "optimization": true, 44 | "outputHashing": "all", 45 | "sourceMap": false, 46 | "extractCss": true, 47 | "namedChunks": false, 48 | "aot": true, 49 | "extractLicenses": true, 50 | "vendorChunk": false, 51 | "buildOptimizer": true, 52 | "budgets": [ 53 | { 54 | "type": "initial", 55 | "maximumWarning": "2mb", 56 | "maximumError": "5mb" 57 | }, 58 | { 59 | "type": "anyComponentStyle", 60 | "maximumWarning": "6kb", 61 | "maximumError": "10kb" 62 | } 63 | ] 64 | } 65 | } 66 | }, 67 | "serve": { 68 | "builder": "@angular-devkit/build-angular:dev-server", 69 | "options": { 70 | "browserTarget": "frontend:build" 71 | }, 72 | "configurations": { 73 | "production": { 74 | "browserTarget": "frontend:build:production" 75 | } 76 | } 77 | }, 78 | "extract-i18n": { 79 | "builder": "@angular-devkit/build-angular:extract-i18n", 80 | "options": { 81 | "browserTarget": "frontend:build" 82 | } 83 | }, 84 | "test": { 85 | "builder": "@angular-devkit/build-angular:karma", 86 | "options": { 87 | "main": "src/test.ts", 88 | "polyfills": "src/polyfills.ts", 89 | "tsConfig": "tsconfig.spec.json", 90 | "karmaConfig": "karma.conf.js", 91 | "assets": [ 92 | "src/favicon.ico", 93 | "src/assets" 94 | ], 95 | "styles": [ 96 | "src/styles.css" 97 | ], 98 | "scripts": [] 99 | } 100 | }, 101 | "lint": { 102 | "builder": "@angular-devkit/build-angular:tslint", 103 | "options": { 104 | "tsConfig": [ 105 | "tsconfig.app.json", 106 | "tsconfig.spec.json", 107 | "e2e/tsconfig.json" 108 | ], 109 | "exclude": [ 110 | "**/node_modules/**" 111 | ] 112 | } 113 | }, 114 | "e2e": { 115 | "builder": "@angular-devkit/build-angular:protractor", 116 | "options": { 117 | "protractorConfig": "e2e/protractor.conf.js", 118 | "devServerTarget": "frontend:serve" 119 | }, 120 | "configurations": { 121 | "production": { 122 | "devServerTarget": "frontend:serve:production" 123 | } 124 | } 125 | } 126 | } 127 | }}, 128 | "defaultProject": "frontend" 129 | } 130 | -------------------------------------------------------------------------------- /browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /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('frontend app is running!'); 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 | -------------------------------------------------------------------------------- /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 .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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/frontend'), 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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "develop": "ng serve", 7 | "start": "ng serve", 8 | "build": "ng build", 9 | "test": "ng test", 10 | "lint": "ng lint", 11 | "e2e": "ng e2e" 12 | }, 13 | "private": true, 14 | "dependencies": { 15 | "@angular/animations": "~8.2.14", 16 | "@angular/common": "~8.2.14", 17 | "@angular/compiler": "~8.2.14", 18 | "@angular/core": "~8.2.14", 19 | "@angular/forms": "~8.2.14", 20 | "@angular/platform-browser": "~8.2.14", 21 | "@angular/platform-browser-dynamic": "~8.2.14", 22 | "@angular/router": "~8.2.14", 23 | "apollo-angular": "^1.8.0", 24 | "apollo-angular-link-http": "^1.9.0", 25 | "apollo-cache-inmemory": "^1.6.0", 26 | "apollo-client": "^2.6.0", 27 | "apollo-link": "^1.2.11", 28 | "graphql": "^14.5.0", 29 | "graphql-tag": "^2.10.0", 30 | "jquery": "^3.4.1", 31 | "ngx-markdown": "^8.2.1", 32 | "rxjs": "~6.4.0", 33 | "tslib": "^1.10.0", 34 | "uikit": "^3.2.4", 35 | "zone.js": "~0.9.1" 36 | }, 37 | "devDependencies": { 38 | "@angular-devkit/build-angular": "~0.803.20", 39 | "@angular/cli": "~8.3.20", 40 | "@angular/compiler-cli": "~8.2.14", 41 | "@angular/language-service": "~8.2.14", 42 | "@types/jasmine": "~3.3.8", 43 | "@types/jasminewd2": "~2.0.3", 44 | "@types/node": "~8.9.4", 45 | "codelyzer": "^5.0.0", 46 | "jasmine-core": "~3.4.0", 47 | "jasmine-spec-reporter": "~4.2.1", 48 | "karma": "~4.1.0", 49 | "karma-chrome-launcher": "~2.2.0", 50 | "karma-coverage-istanbul-reporter": "~2.0.1", 51 | "karma-jasmine": "~2.0.1", 52 | "karma-jasmine-html-reporter": "^1.4.0", 53 | "protractor": "~5.4.0", 54 | "ts-node": "~7.0.0", 55 | "tslint": "~5.15.0", 56 | "typescript": "~3.5.3" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/screenshot.png -------------------------------------------------------------------------------- /src/app/apollo/queries/article/article.js: -------------------------------------------------------------------------------- 1 | import gql from "graphql-tag"; 2 | 3 | const ARTICLE_QUERY = gql` 4 | query Articles($id: ID!) { 5 | article(id: $id) { 6 | id 7 | title 8 | content 9 | image { 10 | url 11 | } 12 | category { 13 | id 14 | name 15 | } 16 | published_at 17 | } 18 | } 19 | `; 20 | 21 | export default ARTICLE_QUERY; 22 | -------------------------------------------------------------------------------- /src/app/apollo/queries/article/articles.js: -------------------------------------------------------------------------------- 1 | import gql from "graphql-tag"; 2 | 3 | const ARTICLES_QUERY = gql` 4 | query Articles { 5 | articles { 6 | id 7 | title 8 | category { 9 | id 10 | name 11 | } 12 | image { 13 | url 14 | } 15 | } 16 | } 17 | `; 18 | 19 | export default ARTICLES_QUERY; 20 | -------------------------------------------------------------------------------- /src/app/apollo/queries/category/articles.js: -------------------------------------------------------------------------------- 1 | import gql from "graphql-tag"; 2 | 3 | const CATEGORY_ARTICLES_QUERY = gql` 4 | query Category($id: ID!) { 5 | category(id: $id) { 6 | id 7 | name 8 | articles { 9 | id 10 | title 11 | content 12 | image { 13 | url 14 | } 15 | category { 16 | id 17 | name 18 | } 19 | } 20 | } 21 | } 22 | `; 23 | 24 | export default CATEGORY_ARTICLES_QUERY; 25 | -------------------------------------------------------------------------------- /src/app/apollo/queries/category/categories.js: -------------------------------------------------------------------------------- 1 | import gql from "graphql-tag"; 2 | 3 | const CATEGORIES_QUERY = gql` 4 | query Categories { 5 | categories { 6 | id 7 | name 8 | } 9 | } 10 | `; 11 | 12 | export default CATEGORIES_QUERY; 13 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | 5 | const routes: Routes = []; 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forRoot(routes)], 9 | exports: [RouterModule] 10 | }) 11 | export class AppRoutingModule { } 12 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/app/app.component.css -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /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 'frontend'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.debugElement.componentInstance; 26 | expect(app.title).toEqual('frontend'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.debugElement.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('frontend app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /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 = 'frontend'; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import { GraphQLModule } from './graphql.module'; 7 | import { HttpClientModule } from '@angular/common/http'; 8 | 9 | import { MarkdownModule } from "ngx-markdown"; 10 | 11 | import { RouterModule, Routes } from "@angular/router"; 12 | 13 | import { NavComponent } from "./nav/nav.component"; 14 | import { ArticlesComponent } from "./articles/articles.component"; 15 | import { ArticleComponent } from "./article/article.component"; 16 | import { CategoryComponent } from "./category/category.component"; 17 | 18 | const appRoutes: Routes = [ 19 | { path: "", component: ArticlesComponent }, 20 | { path: "article/:id", component: ArticleComponent }, 21 | { path: "category/:id", component: CategoryComponent } 22 | ]; 23 | 24 | @NgModule({ 25 | declarations: [ 26 | AppComponent, 27 | NavComponent, 28 | ArticlesComponent, 29 | ArticleComponent, 30 | CategoryComponent 31 | ], 32 | imports: [ 33 | MarkdownModule.forRoot(), 34 | RouterModule.forRoot(appRoutes, { enableTracing: true }), 35 | BrowserModule, 36 | AppRoutingModule, 37 | GraphQLModule, 38 | HttpClientModule 39 | ], 40 | providers: [], 41 | bootstrap: [AppComponent] 42 | }) 43 | export class AppModule { } 44 | -------------------------------------------------------------------------------- /src/app/article/article.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/app/article/article.component.css -------------------------------------------------------------------------------- /src/app/article/article.component.html: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |
18 |

19 | 20 | {{ data.article.content }} 21 | 22 |

23 |

24 |
25 |
26 | -------------------------------------------------------------------------------- /src/app/article/article.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ArticleComponent } from './article.component'; 4 | 5 | describe('ArticleComponent', () => { 6 | let component: ArticleComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ArticleComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ArticleComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/article/article.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { Apollo } from "apollo-angular"; 3 | import gql from "graphql-tag"; 4 | import ARTICLE_QUERY from "../apollo/queries/article/article"; 5 | import { ActivatedRoute } from "@angular/router"; 6 | import { Subscription } from "rxjs"; 7 | import { AppComponent } from '../app.component'; 8 | import { environment } from '../../environments/environment'; 9 | 10 | @Component({ 11 | selector: "app-article", 12 | templateUrl: "./article.component.html", 13 | styleUrls: ["./article.component.css"] 14 | }) 15 | export class ArticleComponent implements OnInit { 16 | data: any = {}; 17 | loading = true; 18 | errors: any; 19 | apiURL = environment.apiURL; 20 | 21 | private queryArticle: Subscription; 22 | 23 | constructor(private apollo: Apollo, private route: ActivatedRoute) {} 24 | 25 | ngOnInit() { 26 | this.queryArticle = this.apollo 27 | .watchQuery({ 28 | query: ARTICLE_QUERY, 29 | variables: { 30 | id: this.route.snapshot.paramMap.get("id") 31 | } 32 | }) 33 | .valueChanges.subscribe(result => { 34 | this.data = result.data; 35 | this.loading = result.loading; 36 | this.errors = result.errors; 37 | }); 38 | } 39 | ngOnDestroy() { 40 | this.queryArticle.unsubscribe(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/app/articles/articles.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/app/articles/articles.component.css -------------------------------------------------------------------------------- /src/app/articles/articles.component.html: -------------------------------------------------------------------------------- 1 | 67 | -------------------------------------------------------------------------------- /src/app/articles/articles.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ArticlesComponent } from './articles.component'; 4 | 5 | describe('ArticlesComponent', () => { 6 | let component: ArticlesComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ArticlesComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ArticlesComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/articles/articles.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { Apollo } from "apollo-angular"; 3 | import gql from "graphql-tag"; 4 | import ARTICLES_QUERY from "../apollo/queries/article/articles"; 5 | import { Subscription } from "rxjs"; 6 | 7 | @Component({ 8 | selector: "app-articles", 9 | templateUrl: "./articles.component.html", 10 | styleUrls: ["./articles.component.css"] 11 | }) 12 | export class ArticlesComponent implements OnInit { 13 | data: any = {}; 14 | loading = true; 15 | errors: any; 16 | leftArticlesCount: any; 17 | leftArticles: any[]; 18 | rightArticles: any[]; 19 | 20 | private queryArticles: Subscription; 21 | 22 | constructor(private apollo: Apollo) {} 23 | 24 | ngOnInit() { 25 | this.queryArticles = this.apollo 26 | .watchQuery({ 27 | query: ARTICLES_QUERY 28 | }) 29 | .valueChanges.subscribe(result => { 30 | this.data = result.data; 31 | this.leftArticlesCount = Math.ceil(this.data.articles.length / 5); 32 | this.leftArticles = this.data.articles.slice(0, this.leftArticlesCount); 33 | this.rightArticles = this.data.articles.slice( 34 | this.leftArticlesCount, 35 | this.data.articles.length 36 | ); 37 | this.loading = result.loading; 38 | this.errors = result.errors; 39 | }); 40 | } 41 | 42 | ngOnDestroy() { 43 | this.queryArticles.unsubscribe(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/app/category/category.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/app/category/category.component.css -------------------------------------------------------------------------------- /src/app/category/category.component.html: -------------------------------------------------------------------------------- 1 | 67 | -------------------------------------------------------------------------------- /src/app/category/category.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CategoryComponent } from './category.component'; 4 | 5 | describe('CategoryComponent', () => { 6 | let component: CategoryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CategoryComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CategoryComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/category/category.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { Apollo } from "apollo-angular"; 3 | import gql from "graphql-tag"; 4 | import CATEGORY_ARTICLES_QUERY from "../apollo/queries/category/articles"; 5 | import { ActivatedRoute, ParamMap } from "@angular/router"; 6 | import { Subscription } from "rxjs"; 7 | 8 | @Component({ 9 | selector: "app-category", 10 | templateUrl: "./category.component.html", 11 | styleUrls: ["./category.component.css"] 12 | }) 13 | export class CategoryComponent implements OnInit { 14 | data: any = {}; 15 | category: any = {}; 16 | loading = true; 17 | errors: any; 18 | leftArticlesCount: any; 19 | leftArticles: any[]; 20 | rightArticles: any[]; 21 | id: any; 22 | 23 | private queryCategoriesArticles: Subscription; 24 | 25 | constructor(private apollo: Apollo, private route: ActivatedRoute) {} 26 | 27 | ngOnInit() { 28 | this.route.paramMap.subscribe((params: ParamMap) => { 29 | this.id = params.get("id"); 30 | this.queryCategoriesArticles = this.apollo 31 | .watchQuery({ 32 | query: CATEGORY_ARTICLES_QUERY, 33 | variables: { 34 | id: this.id 35 | } 36 | }) 37 | .valueChanges.subscribe(result => { 38 | this.data = result.data 39 | this.category = this.data.category.name 40 | console.log(this.data) 41 | this.leftArticlesCount = Math.ceil(this.data.category.articles.length / 5); 42 | this.leftArticles = this.data.category.articles.slice(0, this.leftArticlesCount); 43 | this.rightArticles = this.data.category.articles.slice( 44 | this.leftArticlesCount, 45 | this.data.category.articles.length 46 | ); 47 | this.loading = result.loading; 48 | this.errors = result.errors; 49 | }); 50 | }); 51 | } 52 | ngOnDestroy() { 53 | this.queryCategoriesArticles.unsubscribe(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/app/graphql.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {ApolloModule, APOLLO_OPTIONS} from 'apollo-angular'; 3 | import {HttpLinkModule, HttpLink} from 'apollo-angular-link-http'; 4 | import {InMemoryCache} from 'apollo-cache-inmemory'; 5 | 6 | const uri = 'http://localhost:1337/graphql'; // <-- add the URL of the GraphQL server here 7 | export function createApollo(httpLink: HttpLink) { 8 | return { 9 | link: httpLink.create({uri}), 10 | cache: new InMemoryCache(), 11 | }; 12 | } 13 | 14 | @NgModule({ 15 | exports: [ApolloModule, HttpLinkModule], 16 | providers: [ 17 | { 18 | provide: APOLLO_OPTIONS, 19 | useFactory: createApollo, 20 | deps: [HttpLink], 21 | }, 22 | ], 23 | }) 24 | export class GraphQLModule {} 25 | -------------------------------------------------------------------------------- /src/app/nav/nav.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/app/nav/nav.component.css -------------------------------------------------------------------------------- /src/app/nav/nav.component.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /src/app/nav/nav.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { NavComponent } from './nav.component'; 4 | 5 | describe('NavComponent', () => { 6 | let component: NavComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NavComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NavComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/nav/nav.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Apollo } from "apollo-angular"; 3 | import gql from "graphql-tag"; 4 | import CATEGORIES_QUERY from "../apollo/queries/category/categories"; 5 | import { Subscription } from "rxjs"; 6 | 7 | @Component({ 8 | selector: 'app-nav', 9 | templateUrl: './nav.component.html', 10 | styleUrls: ['./nav.component.css'] 11 | }) 12 | export class NavComponent implements OnInit { 13 | data: any = {}; 14 | loading = true; 15 | errors: any; 16 | 17 | private queryCategories: Subscription; 18 | 19 | constructor(private apollo: Apollo) {} 20 | 21 | ngOnInit() { 22 | this.queryCategories = this.apollo 23 | .watchQuery({ 24 | query: CATEGORIES_QUERY 25 | }) 26 | .valueChanges.subscribe(result => { 27 | this.data = result.data; 28 | this.loading = result.loading; 29 | this.errors = result.errors; 30 | }); 31 | } 32 | ngOnDestroy() { 33 | this.queryCategories.unsubscribe(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | apiURL: '', 4 | }; 5 | -------------------------------------------------------------------------------- /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 | apiURL: 'http:localhost:1337', 8 | }; 9 | 10 | /* 11 | * For easier debugging in development mode, you can import the following file 12 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 13 | * 14 | * This import should be commented out in production mode because it will have a negative impact 15 | * on performance if an error is thrown. 16 | */ 17 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 18 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strapi/strapi-starter-angular-blog/8674ce93fe016737a61bd299d97a8d41147612da/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Frontend 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /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/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__UNPATCHED_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 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import "../node_modules/uikit/dist/css/uikit.min.css"; 3 | @import "../node_modules/uikit/dist/css/uikit.css"; 4 | @import "../node_modules/uikit/dist/css/uikit-core.css"; 5 | @import url("https://fonts.googleapis.com/css?family=Staatliches"); 6 | 7 | a { 8 | text-decoration: none; 9 | } 10 | 11 | h1 { 12 | font-family: Staatliches; 13 | font-size: 120px; 14 | } 15 | 16 | #category { 17 | font-family: Staatliches; 18 | font-weight: 500; 19 | } 20 | 21 | #title { 22 | letter-spacing: 0.4px; 23 | font-size: 22px; 24 | font-size: 1.375rem; 25 | line-height: 1.13636; 26 | } 27 | 28 | #banner { 29 | margin: 20px; 30 | height: 800px; 31 | } 32 | 33 | #editor { 34 | font-size: 16px; 35 | font-size: 1rem; 36 | line-height: 1.75; 37 | } 38 | 39 | .uk-navbar-container { 40 | background: #fff !important; 41 | font-family: Staatliches; 42 | } 43 | 44 | img:hover { 45 | opacity: 1; 46 | transition: opacity 0.25s cubic-bezier(0.39, 0.575, 0.565, 1); 47 | } 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.ts" 13 | ], 14 | "exclude": [ 15 | "src/test.ts", 16 | "src/**/*.spec.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom", 20 | "esnext.asynciterable" 21 | ] 22 | }, 23 | "angularCompilerOptions": { 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true 26 | } 27 | } -------------------------------------------------------------------------------- /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 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "array-type": false, 5 | "arrow-parens": false, 6 | "deprecation": { 7 | "severity": "warning" 8 | }, 9 | "component-class-suffix": true, 10 | "contextual-lifecycle": true, 11 | "directive-class-suffix": true, 12 | "directive-selector": [ 13 | true, 14 | "attribute", 15 | "app", 16 | "camelCase" 17 | ], 18 | "component-selector": [ 19 | true, 20 | "element", 21 | "app", 22 | "kebab-case" 23 | ], 24 | "import-blacklist": [ 25 | true, 26 | "rxjs/Rx" 27 | ], 28 | "interface-name": false, 29 | "max-classes-per-file": false, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-consecutive-blank-lines": false, 47 | "no-console": [ 48 | true, 49 | "debug", 50 | "info", 51 | "time", 52 | "timeEnd", 53 | "trace" 54 | ], 55 | "no-empty": false, 56 | "no-inferrable-types": [ 57 | true, 58 | "ignore-params" 59 | ], 60 | "no-non-null-assertion": true, 61 | "no-redundant-jsdoc": true, 62 | "no-switch-case-fall-through": true, 63 | "no-var-requires": false, 64 | "object-literal-key-quotes": [ 65 | true, 66 | "as-needed" 67 | ], 68 | "object-literal-sort-keys": false, 69 | "ordered-imports": false, 70 | "quotemark": [ 71 | true, 72 | "single" 73 | ], 74 | "trailing-comma": false, 75 | "no-conflicting-lifecycle": true, 76 | "no-host-metadata-property": true, 77 | "no-input-rename": true, 78 | "no-inputs-metadata-property": true, 79 | "no-output-native": true, 80 | "no-output-on-prefix": true, 81 | "no-output-rename": true, 82 | "no-outputs-metadata-property": true, 83 | "template-banana-in-box": true, 84 | "template-no-negated-async": true, 85 | "use-lifecycle-interface": true, 86 | "use-pipe-transform-interface": true 87 | }, 88 | "rulesDirectory": [ 89 | "codelyzer" 90 | ] 91 | } --------------------------------------------------------------------------------