1.1.4 • Published 6 years ago

angular2-focus v1.1.4

Weekly downloads
330
License
MIT
Repository
github
Last release
6 years ago

angular2-focus

Angular attribute directive that gives focus on an element depending on a given expression.

Build Status version PRs Welcome All Contributors Greenkeeper badge

Install

npm install --save angular2-focus

Example

import {NgModule, Component} from '@angular/core';
import {FocusModule} from 'angular2-focus';

@Component({
  template: `
    <input type="text" focus="true">
  `
})
class AppComponent { }

@NgModule({
  imports: [FocusModule.forRoot()],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule { }

Check the docs for examples using @angular/forms and other third party libraries such as @ng-bootstrap/ng-bootstrap, to focus elements when e.g. using a modal.

Contributors

Thanks goes to these wonderful people (emoji key):

Spyros Ioakeimidis💬 💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago