This site describes our support for the AngularJS (1.x) framework. Visit developer.blackbaud.com/skyux for information on our latest version.

Resources

The resources constant and filter allow you to localize SKY UX components. bbResources mostly applies to component development. When you build SKY UX and need to render a string, you can inject the bbResources constant. When you inject bbResources, all locale strings are available on the bbResources object and in a bbResources filter. You can view the available local strings on the SKY UX GitHub repo.

Demo

Financial year localized using the bbResources constant: {{ resourcesCtrl.fiscal }}

Financial year localized using the bbResources filter: {{ 'date_range_picker_this_fiscal_year' | bbResources }}

Markup

<div ng-controller="ResourcesTestController as resourcesCtrl">
  <p>Financial year localized using the <code>bbResources</code> constant: {{ resourcesCtrl.fiscal }}</p>
  <p>Financial year localized using the <code>bbResources</code> filter: {{ 'date_range_picker_this_fiscal_year' | bbResources }}</p>
</div>

JavaScript

/*global angular */

(function () {
    'use strict';

    function ResourcesTestController(bbResources) {
        var vm = this;
        vm.fiscal = bbResources.date_range_picker_this_fiscal_year;
    }

    ResourcesTestController.$inject = ['bbResources'];

    angular.module('stache')
        .controller('ResourcesTestController', ResourcesTestController);
}());