test(img): img/basic test export MyImg component from NgModule

This commit is contained in:
Dan Bucholtz
2017-03-21 16:56:11 -05:00
parent 99142f8ebe
commit f88f588d2d
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,5 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..'; import { IonicPageModule } from '../../../../../..';
import { MyImg } from './my-img'; import { MyImg } from './my-img';
@ -7,6 +8,9 @@ import { MyImg } from './my-img';
declarations: [ declarations: [
MyImg, MyImg,
], ],
exports: [
MyImg
],
imports: [ imports: [
IonicPageModule.forChild(MyImg) IonicPageModule.forChild(MyImg)
] ]

View File

@ -1,11 +1,11 @@
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
@Component({ @Component({
selector: '<my-img>', selector: 'my-img',
template: '<ion-img [width]="width" [height]="height" [src]="src"></ion-img>' template: `<ion-img [width]="width" [height]="height" [src]="src"></ion-img>`
}) })
export class MyImg { export class MyImg {
@Input() width: any; @Input() public width: number;
@Input() height: any; @Input() public height: number;
@Input() src: any; @Input() public src: string;
} }