Skip to content

Commit 480f738

Browse files
committed
fix(package): added static attr to the contenct childs
1 parent ba9a318 commit 480f738

File tree

6 files changed

+26
-15
lines changed

6 files changed

+26
-15
lines changed

package-lock.json

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"devDependencies": {
3939
"@angular-devkit/schematics": "^8.1.3",
4040
"@angular/animations": "^8.1.3",
41-
"@angular/compiler": "^8.1.3",
42-
"@angular/compiler-cli": "^8.1.3",
41+
"@angular/compiler": "8.0.3",
42+
"@angular/compiler-cli": "8.0.3",
4343
"@angular/forms": "^8.1.3",
4444
"@angular/platform-browser": "^8.1.3",
4545
"@angular/platform-browser-dynamic": "^8.1.3",

src/module/component/mat-jumbotron/content/mat-jumbotron-content.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {Component, OnInit, TemplateRef, ViewChild} from '@angular/core';
88
export class MatJumbotronContentComponent implements OnInit {
99

1010
/** Template for page outlook content. */
11-
@ViewChild(TemplateRef)
12-
content: TemplateRef<any>;
11+
@ViewChild(TemplateRef, {static: false}) content: TemplateRef<any>;
1312

1413
constructor() {
1514
}

src/module/component/mat-jumbotron/mat-jumbotron.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {MatJumbotronContentComponent} from './content/mat-jumbotron-content.comp
99
})
1010
export class MatJumbotronComponent {
1111

12-
@ContentChild(MatJumbotronContentComponent)
13-
jumbotronContent: MatJumbotronContentComponent;
12+
@ContentChild(MatJumbotronContentComponent, {static: false}) jumbotronContent: MatJumbotronContentComponent;
1413

1514
@Input()
1615
imgURL: string;

src/module/mat-jumbotron.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {CommonModule} from '@angular/common';
2-
import {NgModule, ModuleWithProviders} from '@angular/core';
2+
import {NgModule} from '@angular/core';
33

44
import {MatCardModule} from '@angular/material';
55
import {FlexLayoutModule} from '@angular/flex-layout';

src/schematics/src/ng-add/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export function addPackageJsonDependencies(): Rule {
3333
version: loadPackageVersionGracefully(context) || 'latest',
3434
name: '@angular-material-extensions/jumbotron'
3535
},
36-
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/animations'},
37-
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/forms'},
36+
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '8.1.2', name: '@angular/animations'},
37+
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '8.1.2', name: '@angular/forms'},
3838
];
3939

4040
dependencies.forEach(dependency => {
@@ -78,6 +78,7 @@ export function getPackageVersionFromPackageJson(tree: Tree, name: string): stri
7878
return null;
7979
}
8080

81+
// tslint:disable-next-line:no-non-null-assertion
8182
const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8'));
8283

8384
if (packageJson.dependencies && packageJson.dependencies[name]) {

0 commit comments

Comments
 (0)