-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f0024a
commit 2673918
Showing
16 changed files
with
37,922 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Node template | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Compiled angular 2 files | ||
aot | ||
|
||
# Generated compiled source files | ||
*.js | ||
*.d.ts | ||
*.metadata.json | ||
|
||
# Exclude the bundle demo file | ||
!docs/bundle.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# angular2-focus | ||
Angular2 directive that gives focus on an element depending on a given expression | ||
|
||
Angular2 directive that gives focus on an element depending on a given expression. | ||
|
||
## Install | ||
|
||
`npm install --save angular2-focus` | ||
|
||
## Example | ||
|
||
```typescript | ||
import {NgModule, Component} from '@angular/core'; | ||
import {Focsu} from 'angular2-focus'; | ||
|
||
@Component({ | ||
template: ` | ||
<input type="text" focus="true"> | ||
` | ||
}) | ||
class AppComponent { } | ||
|
||
@NgModule({ | ||
imports: [Focus], | ||
declarations: [AppComponent], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } | ||
``` | ||
|
||
Check the [docs](docs) for a complete example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"files": [ | ||
"./docs/**/*.{html,htm,css,js}" | ||
], | ||
"server": { | ||
"baseDir": "./docs" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '@angular/core'; | ||
@Component({ | ||
selector: 'app', | ||
templateUrl: 'app.html' | ||
}) | ||
export class AppComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.aligner { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
min-height: 100vh; | ||
} | ||
|
||
.aligner-item { | ||
max-width: 50%; | ||
} | ||
|
||
.aligner-item--fixed { | ||
flex: none; | ||
max-width: 50%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="aligner"> | ||
<div class="aligner-item aligner-item--fixed"> | ||
<label> | ||
<select focus="true"> | ||
<option>gluttony</option> | ||
<option>greed</option> | ||
<option>sloth</option> | ||
<option>envy</option> | ||
<option>wrath</option> | ||
<option>pride</option> | ||
<option>lust</option> | ||
</select> | ||
</label> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {NgModule} from '@angular/core'; | ||
import {BrowserModule} from '@angular/platform-browser'; | ||
import {AppComponent} from './app.component'; | ||
import {Focus} from '../index'; | ||
@NgModule({ | ||
imports: [BrowserModule, Focus], | ||
declarations: [AppComponent], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { | ||
} |
Oops, something went wrong.