Coder Social home page Coder Social logo

tudorgergely / angular2-stretchy Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 739 KB

angular2-stretchy is an Angular2 directive that automatically adjusts input width to fit content.

Home Page: https://tudorgergely.github.io/angular2-stretchy/

License: MIT License

TypeScript 100.00%
angular2 directive typescript input stretchy width

angular2-stretchy's Introduction

angular2-stretchy

angular2-stretchy is an Angular2 directive that automatically adjusts input width to fit content.

Demo:

https://tudorgergely.github.io/angular2-stretchy/

Installation:

npm install angular2-stretchy

Use Example:

Add the declaration to your @NgModule:

import {StretchyModule} from 'angular2-stretchy';

...

@NgModule({
  imports: [
    StretchyModule
  ]
})

Use directly inside your HTML templates

<input stretchy />

Set normal styling on input such as min-width

<input stretchy style="min-width: 300px;"/>

Author

Tudor Gergely

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.

angular2-stretchy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rubythonode

angular2-stretchy's Issues

invoke width with pre-filled input value.

Add following to ngOnInit to enable width auto assign

setTimeout(()=>{ this.sizeDiv.innerText = this.elementRef.nativeElement.value; this.inputWidth = this.sizeDiv.getBoundingClientRect().width; })

Badly packaged library for Angular 5

Hello I'm facing this output after updating my app to Angular 5:

ERROR in ./node_modules/angular2-stretchy/index.ts
Module build failed: Error: ./node_modules/angular2-stretchy/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

npm - 5.5.1
node - 8.9.3

"dependencies": {
    "@angular/animations": "5.2.1",
    "@angular/common": "5.2.1",
    "@angular/compiler": "5.2.1",
    "@angular/core": "5.2.1",
    "@angular/forms": "5.2.1",
    "@angular/http": "5.2.1",
    "@angular/platform-browser": "^5.2.1",
    "@angular/platform-browser-dynamic": "^5.2.1",
    "@angular/router": "^5.2.1",
    "angular2-stretchy": "^1.0.1",
    "animate.css": "^3.5.2",
    "chart.js": "^2.6.0",
    "compression": "^1.7.0",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "morgan": "^1.8.1",
    "rotating-file-stream": "^1.2.2",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.5",
    "@angular/compiler-cli": "5.2.1",
    "@angular/language-service": "5.2.1",
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.