Skip to content

Commit

Permalink
feat(package): udpated to beta.12 and ng2-bootstrap 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Mar 31, 2016
1 parent 1243af3 commit 2e3de82
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ node_modules

.idea
app/**/*.js
app/**/*.js.map
app/**/*.js.map
typings
25 changes: 23 additions & 2 deletions app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
import {Component} from 'angular2/core';
import {Alert} from 'ng2-bootstrap/ng2-bootstrap';
import {Alert, DATEPICKER_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';

@Component({
selector: 'my-app',
directives: [Alert],
directives: [Alert, DATEPICKER_DIRECTIVES],
template: `
<alert type="info">ng2-bootstrap hello world!</alert>
<pre>Selected date is: <em *ngIf="dt">{{ getDate() | date:'fullDate'}}</em></pre>
<h4>Inline</h4>
<div style="display:inline-block; min-height:290px;">
<datepicker [(ngModel)]="dt" [minDate]="minDate" [showWeeks]="true"></datepicker>
</div>
`,
})
export class AppComponent {
public dt:Date = new Date();
private minDate:Date = null;
private events:Array<any>;
private tomorrow:Date;
private afterTomorrow:Date;
private formats:Array<string> = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
private format = this.formats[0];
private dateOptions:any = {
formatYear: 'YY',
startingDay: 1
};
private opened:boolean = false;

public getDate():number {
return this.dt && this.dt.getTime() || new Date().getTime();
}
}
11 changes: 7 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">

<!-- 1. Load libraries -->
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>

<script src="node_modules/angular2/bundles/angular2-polyfills.min.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/rxjs/bundles/Rx.min.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script
src="node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>

<script src="node_modules/ng2-bootstrap/bundles/ng2-bootstrap.min.js"></script>
<!-- 2. Configure SystemJS -->
<script>
System.config({
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"postinstall": " ./node_modules/.bin/typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
Expand All @@ -11,15 +12,16 @@
"dependencies": {
"angular2": "2.0.0-beta.12",
"bootstrap": "^3.3.6",
"es6-shim": "^0.33.3",
"ng2-bootstrap": "1.0.7",
"es6-shim": "0.35.0",
"ng2-bootstrap": "1.0.9",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"systemjs": "0.19.25",
"zone.js": "0.6.6"
"typings": "0.7.11",
"zone.js": "0.6.8"
},
"devDependencies": {
"concurrently": "1.0.0",
"concurrently": "2.0.0",
"lite-server": "2.1.0",
"typescript": "1.8.9"
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"listFiles": true
},
"exclude": [
"node_modules"
"node_modules",
"typings/browser.d.ts"
]
}
5 changes: 5 additions & 0 deletions typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654"
}
}

0 comments on commit 2e3de82

Please sign in to comment.