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 { IonicPageModule } from '../../../../../..';
import { MyImg } from './my-img';
@ -7,6 +8,9 @@ import { MyImg } from './my-img';
declarations: [
MyImg,
],
exports: [
MyImg
],
imports: [
IonicPageModule.forChild(MyImg)
]

View File

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