Skip to content

Commit

Permalink
fix(package): added static attr to the contenct childs
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Jul 31, 2019
1 parent ba9a318 commit 480f738
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
24 changes: 18 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"devDependencies": {
"@angular-devkit/schematics": "^8.1.3",
"@angular/animations": "^8.1.3",
"@angular/compiler": "^8.1.3",
"@angular/compiler-cli": "^8.1.3",
"@angular/compiler": "8.0.3",
"@angular/compiler-cli": "8.0.3",
"@angular/forms": "^8.1.3",
"@angular/platform-browser": "^8.1.3",
"@angular/platform-browser-dynamic": "^8.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {Component, OnInit, TemplateRef, ViewChild} from '@angular/core';
export class MatJumbotronContentComponent implements OnInit {

/** Template for page outlook content. */
@ViewChild(TemplateRef)
content: TemplateRef<any>;
@ViewChild(TemplateRef, {static: false}) content: TemplateRef<any>;

constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {MatJumbotronContentComponent} from './content/mat-jumbotron-content.comp
})
export class MatJumbotronComponent {

@ContentChild(MatJumbotronContentComponent)
jumbotronContent: MatJumbotronContentComponent;
@ContentChild(MatJumbotronContentComponent, {static: false}) jumbotronContent: MatJumbotronContentComponent;

@Input()
imgURL: string;
Expand Down
2 changes: 1 addition & 1 deletion src/module/mat-jumbotron.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {CommonModule} from '@angular/common';
import {NgModule, ModuleWithProviders} from '@angular/core';
import {NgModule} from '@angular/core';

import {MatCardModule} from '@angular/material';
import {FlexLayoutModule} from '@angular/flex-layout';
Expand Down
5 changes: 3 additions & 2 deletions src/schematics/src/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function addPackageJsonDependencies(): Rule {
version: loadPackageVersionGracefully(context) || 'latest',
name: '@angular-material-extensions/jumbotron'
},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/animations'},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/forms'},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '8.1.2', name: '@angular/animations'},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '8.1.2', name: '@angular/forms'},
];

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

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

if (packageJson.dependencies && packageJson.dependencies[name]) {
Expand Down

0 comments on commit 480f738

Please sign in to comment.