Skip to content

Commit

Permalink
rename directive
Browse files Browse the repository at this point in the history
  • Loading branch information
Truc S. Giang committed Jan 3, 2020
1 parent 4d81a0e commit 00c1acc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Include JQuery in your `angular.json` file

Install package
```
npm i @smplfrs/smpl-select2
npm i @smplfrs/angular-select2
```

Include default styles in your `angular.json` file
Expand Down
2 changes: 1 addition & 1 deletion projects/smpl-select2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Include JQuery in your `angular.json` file

Install package
```
npm i @smplfrs/smpl-select2
npm i @smplfrs/angular-select2
```

Include default styles in your `angular.json` file
Expand Down
2 changes: 1 addition & 1 deletion projects/smpl-select2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smplfrs/angular-select2",
"version": "1.0.0",
"version": "1.0.1",
"repository": {
"type": "git",
"url": "https://github.com/smplfrs/angular-select2.git"
Expand Down
4 changes: 2 additions & 2 deletions projects/smpl-select2/src/lib/smpl-select2.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import $ from 'jquery';
import 'select2';

@Directive({
selector: '[smpl-select2]',
selector: '[smplSelect2]',
providers: [
{
provide: NG_VALUE_ACCESSOR,
Expand All @@ -17,7 +17,7 @@ import 'select2';
})
export class SmplSelect2Directive implements ControlValueAccessor, OnInit, OnChanges, OnDestroy {

@Input('smpl-select2') configOptions: Select2Config;
@Input('smplSelect2') configOptions: Select2Config;

@Input('static') staticOptionData: boolean = false;

Expand Down
6 changes: 3 additions & 3 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<h5>Static options</h5>
<select smpl-select2 [static]="true" style="width: 200px;" (select)="selectOption($event)">
<select smplSelect2 [static]="true" style="width: 200px;" (select)="selectOption($event)">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>

<h5>Dynamic data</h5>
<select smpl-select2 [dataSource]="simpleDataSource" valueProperty="value" displayProperty="title" style="width: 200px;"
<select smplSelect2 [dataSource]="simpleDataSource" valueProperty="value" displayProperty="title" style="width: 200px;"
(select)="selectOption($event)"></select>

<h5>Async data source</h5>
<select smpl-select2 [dataSource]="asyncDataSource" placeholder="Type something..." style="width: 200px;"
<select smplSelect2 [dataSource]="asyncDataSource" placeholder="Type something..." style="width: 200px;"
(select)="selectOption($event)"></select>

0 comments on commit 00c1acc

Please sign in to comment.