diff --git a/README.MD b/README.MD index 79a2fe2..0ce1880 100644 --- a/README.MD +++ b/README.MD @@ -4,7 +4,7 @@ A simple Angular module to create a timezone selector using [moment-timezones](h ## [Demo](https://samuelnygaard.github.io/ng2-timezone-selector/) | [Documentation](https://samuelnygaard.github.io/ng2-timezone-selector/docs/) -## New features (0.2.2) +## New features (0.2.3) * Guess the timezone based on browser settings, usage: * `` @@ -25,11 +25,11 @@ $ npm install ng2-timezone-selector --save The library depent on [jQuery](https://github.com/jquery/jquery) and [select2](https://github.com/select2/select2) and [moment-timezone](https://github.com/moment/moment-timezone) -The only file required is the select2 `css` file: +The only file required is the select2 `select2.min.css` file: #### 1. Method (should work for all) -Include the css file in the `angular-cli.json` file (remember to re-run `ng serve`, after editing `angular-cli.json`): +Include the `select2.min.css` file in the `angular-cli.json` file (remember to re-run `ng serve`, after editing `angular-cli.json`): ```json { @@ -39,8 +39,9 @@ Include the css file in the `angular-cli.json` file (remember to re-run `ng serv "apps": [ { ... - "scripts": [ - "../node_modules/select2/dist/js/select2.min.js" + "styles": [ + "styles.scss", + "../node_modules/select2/dist/css/select2.min.css" ], ... } diff --git a/src/index.ts b/src/index.ts index a7b8945..315577f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ export * from './timezone-picker.service'; @NgModule({ imports: [CommonModule], declarations: [TimezonePickerComponent, TimezonePickerPipe], + providers: [TimezonePickerService], exports: [TimezonePickerComponent, TimezonePickerPipe] }) export class TimezonePickerModule { diff --git a/src/package.json b/src/package.json index 0b976ac..49ad473 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "ng2-timezone-selector", - "version": "0.2.2", + "version": "0.2.3", "description": "A simple Angular module to create a timezone selector using moment-timezone", "repository": { diff --git a/src/timezone-picker.component.ts b/src/timezone-picker.component.ts index 766a548..6d7bb54 100644 --- a/src/timezone-picker.component.ts +++ b/src/timezone-picker.component.ts @@ -27,9 +27,7 @@ import 'select2'; {{offsetOfTimezone(c.zones[0])}} - - `, - viewProviders: [TimezonePickerService] + ` }) export class TimezonePickerComponent implements AfterViewInit { /**