Created
June 15, 2017 01:25
-
-
Save okamuuu/7236df9aa0c80e4375f8d25dad14ab83 to your computer and use it in GitHub Desktop.
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
diff --git a/package.json b/package.json | |
index 74e43d6..0a2c4d6 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -22,6 +22,7 @@ | |
"@angular/platform-browser-dynamic": "^4.0.0", | |
"@angular/router": "^4.0.0", | |
"core-js": "^2.4.1", | |
+ "ng2-datepicker": "^1.8.3", | |
"rxjs": "^5.1.0", | |
"zone.js": "^0.8.4" | |
}, | |
diff --git a/src/app/app.component.html b/src/app/app.component.html | |
index d0322ef..6709536 100644 | |
--- a/src/app/app.component.html | |
+++ b/src/app/app.component.html | |
@@ -3,18 +3,5 @@ | |
<h1> | |
Welcome to {{title}}!! | |
</h1> | |
- <img width="300" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo=" /> | |
-</div> | |
-<h2>Here are some links to help you start: </h2> | |
-<ul> | |
- <li> | |
- <h2><a target="_blank" href="https://angular.io/docs/ts/latest/tutorial/">Tour of Heroes</a></h2> | |
- </li> | |
- <li> | |
- <h2><a target="_blank" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2> | |
- </li> | |
- <li> | |
- <h2><a target="_blank" href="http://angularjs.blogspot.ca/">Angular blog</a></h2> | |
- </li> | |
-</ul> | |
+ <ng2-datepicker [options]="options" [(ngModel)]="date"></ng2-datepicker> | |
diff --git a/src/app/app.component.ts b/src/app/app.component.ts | |
index 7b0f672..a85b823 100644 | |
--- a/src/app/app.component.ts | |
+++ b/src/app/app.component.ts | |
@@ -1,4 +1,5 @@ | |
import { Component } from '@angular/core'; | |
+import { DatePickerOptions, DateModel } from 'ng2-datepicker'; | |
@Component({ | |
selector: 'app-root', | |
@@ -6,5 +7,10 @@ import { Component } from '@angular/core'; | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
- title = 'app'; | |
+ date: DateModel; | |
+ options: DatePickerOptions; | |
+ | |
+ constructor() { | |
+ this.options = new DatePickerOptions(); | |
+ } | |
} | |
diff --git a/src/app/app.module.ts b/src/app/app.module.ts | |
index f657163..858c179 100644 | |
--- a/src/app/app.module.ts | |
+++ b/src/app/app.module.ts | |
@@ -2,13 +2,15 @@ import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppComponent } from './app.component'; | |
+import { DatePickerModule } from 'ng2-datepicker'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
- BrowserModule | |
+ BrowserModule, | |
+ DatePickerModule | |
], | |
providers: [], | |
bootstrap: [AppComponent] |
Author
okamuuu
commented
Jun 15, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment