btAddClassOnLoad

Directive (Attribute)

Parameters

Parameter Type Required
bt-add-class-on-load string yes

The btAddClassOnLoad directive adds a class to an img tag when the image fires the load event. This is useful for css transitions.

This directive is useful for CSS Transitions

Example Usage

<style type="text/css">
.my-img {
  opacity: 0;
  transition: opacity 5.0s linear;
}
.loaded {
  opacity: 1;
}
</style>
<img src="images/fpo-he-man.jpg" bt-add-class-on-load="loaded" class="my-img"/>

btAffix

Directive (Attribute)

Requirements ($window)

Parameters

Parameter Type Required Description
offset number no Number of pixels to add to scroll before element is affixed
scroll bool no Indicates if the affixed element is allowed to scroll
fullHeight bool no Indicates that the affixed element spans the entire height of the page
pinnedHeader bool no Indicates that the affixed element spans the entire width of the page and is affixed to the top left

The btAffix element allows a user to affix an element at a given scroll point. Another element with the same height and width will take the place of the element to ensure that the page layout does not break upon affixing.

Example Usage

<div bt-affix offset="500">
  <img src="images/fpo-he-man.jpg"/>
</div>
<img src="images/fpo-he-man.jpg"/>
<img src="images/fpo-he-man.jpg"/>
<img src="images/fpo-he-man.jpg"/>
<img src="images/fpo-he-man.jpg"/>

btCurrency

Filter

The btCurrency filter will format curreny in the same fashion as the built in Angular curreny filter, with one difference; if the currency is whole, that is $2.00, this filter leaves the 00.

btCurrency respects the same l18n and l10n settings as Angular.

Example Usage

<span></span> // $200.00

btFormatDateToLocal

Filter

The btFormatDateToLocal filter will convert any date stored ass UTC to local time, based on local machine settings. This filter accepts any formatting options that Angular's date filter accepts.

This filter assumes the stored date is already in UTC

Example Usage

<span></span>

btPhoneNumber

Filter

The phoneNumberfilter filter will format or unformat a phone number.

btPhoneNUmber has no opinions about the phone number you are trying to format. You will need to do any phone number validation.

Exmaple Usage

<script>
  $scope.string1 = '1234567890';
  $scope.string2 = '123-456-7890';
</script>

<div>
   // (123) 456-7890
   // 1234567890
</div>

Capitalize

Filter

The capitalize filter will simply capitalize the first letter of a string.

Example Usage

<script>
  $scope.string = 'word';
</script>

<span></span> // Word