ng2-bootstrap
Advanced tools
Comparing version 0.34.1 to 0.34.2
{ | ||
"name": "ng2-bootstrap", | ||
"version": "0.34.1", | ||
"version": "0.34.2", | ||
"description": "angular2 bootstrap components", | ||
@@ -38,2 +38,3 @@ "main": "index.js", | ||
"gulp-eslint": "^1.0.0", | ||
"gulp-size": "^1.3.0", | ||
"gulp-tslint": "^3.1.2", | ||
@@ -40,0 +41,0 @@ "pre-commit": "^1.1.1", |
# angular2-bootstrap | ||
Native Angular2 directives for Bootstrap | ||
Goal: smooth transition from ui-bootstrap to angular2, | ||
all components will have same API | ||
[![Code Climate](https://codeclimate.com/github/valor-software/angular2-bootstrap/badges/gpa.svg)](https://codeclimate.com/github/valor-software/angular2-bootstrap) | ||
@@ -13,3 +16,3 @@ [![devDependency Status](https://david-dm.org/valor-software/angular2-bootstrap/dev-status.svg)](https://david-dm.org/valor-software/angular2-bootstrap#info=devDependencies) | ||
- [x] Alert | ||
- [ ] Buttons | ||
- [x] Buttons | ||
- [ ] Carousel | ||
@@ -16,0 +19,0 @@ - [ ] Collapse |
@@ -48,2 +48,4 @@ /// <reference path="../../../typings/tsd.d.ts" /> | ||
this.classes[1] = 'alert-dismissible'; | ||
} else { | ||
this.classes.length = 1; | ||
} | ||
@@ -50,0 +52,0 @@ |
@@ -5,3 +5,4 @@ /// <reference path="../../typings/tsd.d.ts" /> | ||
import {Alert} from 'src/components/alert/alert'; | ||
import {AlertDemo} from 'src/components/demo/alert-demo'; | ||
import {ButtonsDemo} from 'src/components/demo/buttonts-demo'; | ||
@@ -13,30 +14,14 @@ @Component({ | ||
template: ` | ||
<span *ng-if="name">Hello, {{name}}!</span> | ||
<alert [dismiss-on-timeout]="3000">This alert will dismiss in 3s</alert> | ||
<alert *ng-for="#alert of alerts;#i = index" [type]="alert.type" (close)="closeAlert(i)">{{ alert.msg }}</alert> | ||
<div > | ||
</div> | ||
<button type="button" class='btn btn-default' (click)="addAlert()">Add Alert</button> | ||
<alert-demo></alert-demo> | ||
<buttons-demo></buttons-demo> | ||
`, | ||
directives: [Alert, coreDirectives] | ||
directives: [AlertDemo, ButtonsDemo, coreDirectives] | ||
}) | ||
export class Hello { | ||
export class Home { | ||
alerts:Array<Object>; | ||
constructor() { | ||
this.alerts = [ | ||
{type: 'danger', msg: 'Oh snap! Change a few things up and try submitting again.'}, | ||
{type: 'success', msg: 'Well done! You successfully read this important alert message.', closable: true} | ||
]; | ||
} | ||
closeAlert(i:number) { | ||
this.alerts.splice(i, 1); | ||
} | ||
addAlert() { | ||
this.alerts.push({msg: 'Another alert!', closable: true}); | ||
} | ||
} | ||
bootstrap(Hello); | ||
bootstrap(Home); |
@@ -19,4 +19,10 @@ { | ||
"typings/tsd.d.ts", | ||
"src/public/index.ts", | ||
"src/components/alert/alert.ts" | ||
"src/components/demo/alert-demo.ts", | ||
"src/components/demo/buttonts-demo.ts", | ||
"src/components/alert/alert.ts", | ||
"src/components/buttons/button-checkbox.ts", | ||
"src/components/buttons/button-radio.ts" | ||
], | ||
@@ -23,0 +29,0 @@ "exclude": [ |
@@ -11,3 +11,3 @@ { | ||
"label-undefined": true, | ||
"max-line-length": [true, 140], | ||
"max-line-length": [false, 140], | ||
"no-arg": true, | ||
@@ -26,3 +26,3 @@ "no-bitwise": true, | ||
"no-duplicate-variable": true, | ||
"no-empty": true, | ||
"no-empty": false, | ||
"no-eval": true, | ||
@@ -29,0 +29,0 @@ "no-shadowed-variable": true, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26670
19
569
45
20