File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 1414 < title > {{ site.title | default: site.github.repository_name }}</ title >
1515</ head >
1616
17- < body ng-app ="app ">
17+ < body ng-app ="app " ng-controller =" MainCtrl as $ctrl " >
1818
1919<!-- HEADER -->
2020< div id ="header_wrap " class ="outer ">
Original file line number Diff line number Diff line change 1212
1313### Init with a date
1414
15- <div ng-controller =" InitSampleCtrl as $ctrl " >
16- <input-birthday data-ng-model =" $ctrl.birthdate " ></input-birthday >
17- <pre data-ng-bind =" $ctrl.birthdate " ></pre >
18- </div >
15+ <input-birthday data-ng-model =" $ctrl.birthdate " ></input-birthday >
16+ <pre data-ng-bind =" $ctrl.birthdate " ></pre >
1917
2018### Init with default today date
2119
22- <input-birthday data-ng-model =" $ctrl.birthdate " init-today =" true " ></input-birthday >
23- <pre data-ng-bind =" $ctrl.birthdate " ></pre >
20+ <input-birthday data-ng-model =" birthdate2 " init-today =" true " ></input-birthday >
21+ <pre data-ng-bind =" birthdate2 " ></pre >
2422
2523## Usage
2624
Original file line number Diff line number Diff line change 11( ( ) => {
22 'use strict' ;
33
4- angular . module ( 'app' , [ 'angularjs-input-birthday' ] )
5- . controller ( 'InitSampleCtrl' , $scope => {
4+ angular . module ( 'app' , [
5+ 'pascalprecht.translate' ,
6+ 'angularjs-input-birthday' ] )
7+ . config ( [ '$translateProvider' , $translateProvider => {
8+ $translateProvider . preferredLanguage ( 'fr' ) ;
9+ $translateProvider . translations ( 'fr' , {
10+ 'birthday-input' : {
11+ 'year-label' : 'Choose year' ,
12+ 'month-label' : 'Choose month' ,
13+ 'day-label' : 'Choose day' ,
14+ years : 'Years' ,
15+ months : 'Months' ,
16+ days : 'Days'
17+ }
18+ } ) ;
19+ } ] )
20+ . controller ( 'MainCtrl' , $scope => {
621 $scope . birthdate = new Date ( '1990-02-25' ) ;
722 } ) ;
823} ) ( ) ;
You can’t perform that action at this time.
0 commit comments