A collection of Angular libraries Phantom developed sites.
This project was generated with Angular CLI version 7.0.5.
Package one-liner overview.
Package introduction, couple of paragraphs, with small code example.
import {ClipboardModule} from '@phntms/angular-lib';
@NgModule({
imports: [
ClipboardModule,
],
})
export class Foo {}
<button [copyToClipboard]="copyMyContents" aria-label="Copy to clipboard">
Copy to clipboard
</button>
Examples TBC.
Examples TBC.
import {getSocialNetworkShareLink, SocialNetwork} from '@phantom/angular';
class Foo {
readonly socialNetwork = SocialNetwork;
getShareUrl(social: SocialNetwork) {
return getSocialNetworkShareLink(location.href, social);
}
}
<a [attr.href]="getShareUrl(socialNetwork.FACEBOOK)" class="share-link">
Share on Facebook
</a>
Install this package with npm
.
npm i @phntms/angular-lib
Run ng build
to build the project. The build artifacts will be stored in the
dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via
Karma. You can run the tests in watch mode if
you prefer with ng test --watch=false
. Make sure the project is build before
running tests using npm run build
. All tests are run in a pre-push hook
meaning you will not be able to push broken code to the repo.
Build and test the project first.
npm run build
npm run test
From another project, link the build files as a dependency.
cd ~/projects/my-test-project
npm link ../phntms-angular-lib/dist/angular-lib/
If package has different inputs, a list of inputs alongside descriptions of what they do, types, and if required / optional etc.
If package has different outputs, a list of outputs alongside descriptions of what they do, types, etc.
If browser support is limited, a few lines about what's supported.
If package isn't completed, a list of features planned in future releases.
Want to get involved, or found an issue? Please contribute using the GitHub Flow. Create a branch, add commits, and open a Pull Request or submit a new issue.
Please read CONTRIBUTING
for details on our CODE_OF_CONDUCT
, and the process for submitting pull requests to us!