Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 11 Update #14

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
17 changes: 15 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "example/index.html",
"main": "example/main.ts",
Expand All @@ -25,6 +26,12 @@
},
"configurations": {
"prod": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "example/config/environment.ts",
Expand All @@ -33,6 +40,12 @@
]
},
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down Expand Up @@ -128,11 +141,11 @@
"defaultProject": "angular-contents",
"schematics": {
"@schematics/angular:class": {
"spec": false
"skipTests": true
},
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
Expand Down
8 changes: 4 additions & 4 deletions example/app/scrolling-view-table.component.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { Component, ViewEncapsulation, ViewChild, ElementRef, Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { PageScrollService, PageScrollInstance } from 'ngx-page-scroll';
import { PageScrollService, PageScrollInstance } from 'ngx-page-scroll-core';

@Component({
selector: 'app-scrolling-view-table',
templateUrl: 'scrolling-view-table.component.html',
styleUrls: ['scrolling-view-table.component.scss'],
})
export class ScrollingViewTableComponent {
@ViewChild('container') private container: ElementRef;
@ViewChild('container', {static: true}) private container: ElementRef;

constructor(private pageScrollService: PageScrollService, @Inject(DOCUMENT) private document: any) {}

public animateScroll(sectionTarget: string): void {
// https://github.com/Nolanus/ngx-page-scroll#service
const pageScrollInstance: PageScrollInstance = PageScrollInstance.newInstance({
document: this.document, scrollTarget: sectionTarget, scrollingViews: [this.container.nativeElement]
const pageScrollInstance: PageScrollInstance = new PageScrollInstance({
document: this.document, scrollTarget: sectionTarget, scrollViews: [this.container.nativeElement]
});
this.pageScrollService.start(pageScrollInstance);
}
Expand Down
8 changes: 4 additions & 4 deletions example/app/scrolling-view.component.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { Component, ViewEncapsulation, ViewChild, ElementRef, Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { PageScrollService, PageScrollInstance } from 'ngx-page-scroll';
import { PageScrollService, PageScrollInstance } from 'ngx-page-scroll-core';

@Component({
selector: 'app-scrolling-view',
templateUrl: 'scrolling-view.component.html',
styleUrls: ['scrolling-view.component.scss'],
})
export class ScrollingViewComponent {
@ViewChild('container') private container: ElementRef;
@ViewChild('container', {static: true}) private container: ElementRef;

constructor(private pageScrollService: PageScrollService, @Inject(DOCUMENT) private document: any) {}

public animateScroll(sectionTarget: string): void {
// https://github.com/Nolanus/ngx-page-scroll#service
const pageScrollInstance: PageScrollInstance = PageScrollInstance.newInstance({
document: this.document, scrollTarget: sectionTarget, scrollingViews: [this.container.nativeElement]
const pageScrollInstance: PageScrollInstance = new PageScrollInstance({
document: this.document, scrollTarget: sectionTarget, scrollViews: [this.container.nativeElement]
});
this.pageScrollService.start(pageScrollInstance);
}
Expand Down
10 changes: 6 additions & 4 deletions example/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts"
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"example/**/*.d.ts"
]
}
1 change: 0 additions & 1 deletion example/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
Expand Down
Loading