Exposed as module
This commit is contained in:
parent
6f7cfd8479
commit
8d6dfd3cd0
9 changed files with 23 additions and 15 deletions
|
|
@ -3,11 +3,11 @@ import {Directive, ElementRef, Renderer, Input, AfterViewInit, HostListener} fro
|
|||
@Directive({
|
||||
selector: '[fittext]'
|
||||
})
|
||||
export class FittextDirective implements AfterViewInit {
|
||||
export class Ng2FittextDirective implements AfterViewInit {
|
||||
|
||||
@Input('fittext') fittext: any;
|
||||
@Input('container') container: any;
|
||||
@Input('onResize') activateOnResize: boolean;
|
||||
@Input('activateOnResize') activateOnResize: boolean;
|
||||
public fontSize:number = 0;
|
||||
public speed:number = 1.05;
|
||||
|
||||
11
src/ng2fittext.module.ts
Normal file
11
src/ng2fittext.module.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Ng2FittextDirective } from "./ng2fittext.directive";
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
Ng2FittextDirective
|
||||
],
|
||||
exports: [Ng2FittextDirective]
|
||||
})
|
||||
|
||||
export class Ng2FittextModule {};
|
||||
Loading…
Add table
Add a link
Reference in a new issue