You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-6
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,60 @@
1
-
# NgCircleTimer
1
+
# Angular Circle Countdown Timer Component
2
2
3
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
3
+
Flexible, lightweight, easy-to-use, without external dependencies and generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.5.
4
4
5
-
## Code scaffolding
5
+
### Install it
6
+
```npm install --save ng-circle-timer```
6
7
7
-
Run `ng generate component component-name --project ng-circle-timer` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-circle-timer`.
8
-
> Note: Don't forget to add `--project ng-circle-timer` or else it will be added to the default project in your `angular.json` file.
8
+
------------------------
9
+
## How to use it
9
10
10
-
## Build
11
+
You can use it by importing it into app.module.ts.
12
+
```
13
+
import { NgCircleTimerModule } from 'ng-circle-timer';
14
+
15
+
`@NgModule({
16
+
imports: [NgCircleTimerModule],
17
+
declarations: [],
18
+
providers: [],
19
+
})
20
+
export class AppModule { }
21
+
```
22
+
In case you are also using lazy loading pages, check if your pages have a module file, e.g. `otp.module.ts`. If they do, import `NgCircleTimerModule` into the module of each page where you are going to use it.
23
+
```
24
+
@NgModule({
25
+
imports: [
26
+
CommonModule,
27
+
.....
28
+
NgCircleTimerModule,
29
+
],
30
+
declarations: [OtpPage]
31
+
})
32
+
export class OtpPageModule {
33
+
}
34
+
```
35
+
Once imported, it is ready for use. You can use it in your page controller file as follows:
36
+
37
+
```
38
+
@Component({
39
+
selector: 'ngx-otp',
40
+
templateUrl: './otp.page.html',
41
+
styleUrls: ['./otp.page.scss'],
42
+
})
43
+
export class OtpPage implements OnInit, OnDestroy {
0 commit comments