What is ngx-bootstrap?
ngx-bootstrap is a popular Angular library that provides Bootstrap components powered by Angular. It allows developers to use Bootstrap's UI components in their Angular applications with ease, offering a wide range of features and customization options.
What are ngx-bootstrap's main functionalities?
Alerts
The Alerts component allows you to display different types of alert messages such as success, info, warning, and danger. This is useful for providing feedback to users.
<alert type="success">Success Alert</alert>
Modals
The Modals component allows you to create and manage modal dialogs. This is useful for displaying additional information or forms without navigating away from the current page.
<button type="button" class="btn btn-primary" (click)="openModal()">Open Modal</button>
<ng-template #template>
<div class="modal-body">
<p>Modal content goes here.</p>
</div>
</ng-template>
Datepicker
The Datepicker component provides a user-friendly way to select dates. It supports various configurations and customizations to fit different use cases.
<input type="text" class="form-control" bsDatepicker>
Tabs
The Tabs component allows you to create tabbed interfaces. This is useful for organizing content into separate sections that can be easily navigated by users.
<tabset>
<tab heading="Tab 1">Content of Tab 1</tab>
<tab heading="Tab 2">Content of Tab 2</tab>
</tabset>
Tooltips
The Tooltips component provides a way to display additional information when users hover over or focus on an element. This is useful for providing contextual help or explanations.
<button type="button" class="btn btn-secondary" tooltip="Tooltip text">Hover me</button>
Other packages similar to ngx-bootstrap
ng-bootstrap
ng-bootstrap provides Bootstrap components for Angular without the need for jQuery. It offers a similar set of features to ngx-bootstrap but is designed to work seamlessly with Angular's reactive forms and other Angular-specific features.
primeng
PrimeNG is a comprehensive UI component library for Angular that includes a wide range of components such as data tables, charts, and form controls. It offers more components than ngx-bootstrap but may have a steeper learning curve.
angular-material
Angular Material is the official Material Design component library for Angular. It provides a set of high-quality, reusable UI components based on Google's Material Design guidelines. It offers a different design aesthetic compared to Bootstrap.
-----Workflow-----
This is a spreadsheet file used to track ngxBootstrap development
https://docs.google.com/spreadsheets/d/1WoEvfDijiWrZ_un6Up3IKj9-7PDWHXFYhRDvgd7wkj0/edit#gid=0
-
When you pick a component to develop, you need to fill info into a row of "Picked by" & "Status" columns of "Estimate" sheet.
You also need to fill info into a row of "Component", "Developer", "Start Date", "End Date" columns of "Progess" sheet.
-
You can change estimate for component development, if it's necessary for you.
-
When you finish development, you should create a PR, paste PR's link to Gitter and ping other people review it.
You also need to update info for "Pull Request" column of "Progess" sheet.
-
When your PR is approved by all people, it's being merged to Integration branch at Saturday every week
Minh's checking and merging approved PRs for you, then he's deleting your branch in Github
-
Minh's doing test case with your components after they have been merged to Integration branch.
-
After your components pass all Minh's test cases, it's being merged to Master branch.
-----Development-----
This is Integration branch: develop
-
When you pick a component for development, you should branch off Integration branch with branch name as:
feature/(componentName)
Ex: feature/ngxDropdownComponent
-
When someone notify bugs about your component, you should branch off Integration branch with branch name as:
bugfix/(componentName)_(issue)
Ex: bugfix/ngxDropdownComponent_ngxDropdownService-not-working
-----Test UI-----
You can create some test cases for your component in /component/(componentName)/tests/ui
-
Default test cases is "isolated-components"
-
Run this command for test ui:
gulp test-ui --component (component-folder) --testcase (testcase-folder)
NOTICE If you want to test "isolated-components" test case, you don't need to type --testcase option in the command
Ex: gulp test-ui --component dropdown --testcase my-testcase
-----Conventions-----
We should follow Jhon PaPa style. But we have some modifications.
-
For all private variable & function, we should start with undercore(_)
EX: function A(){
var _prop = 'something';
funtion _doSomething(){}
}
-
For constants variable, we should use uppercase & undercore for naming
EX: function A(){
var _MY_CONSTANT = 'my-constant';
}