ns2-front-module-common
Version:
NS2 common module
45 lines • 1.68 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { AbstractRefsService } from "./abstract-refs.service";
/**
* Динамический справочник.
*
* Используется для простых операций с однотипными справочниками. Получать экземпляр сервиса удобно через
* сервис DynamicRefsFactoryService:
*
* @Component({
* providers: [DynamicRefsFactoryService]
* })
* export class MyComponent {
* constructor(private refsFactory: DynamicRefsFactoryService) {}
*
* onInit() {
* this.refsFactory.getInstance('geo').getAll({page: 1}).then((response) => {
* // process response
* }).catch((err) => {
* // process error
* });
* }
* }
*
* Данный сервис нельзя получить через Injector.
*
* @see DynamicRefsBuilderService
*/
var DynamicRefsService = (function (_super) {
__extends(DynamicRefsService, _super);
function DynamicRefsService() {
return _super !== null && _super.apply(this, arguments) || this;
}
return DynamicRefsService;
}(AbstractRefsService));
export { DynamicRefsService };
//# sourceMappingURL=dynamic-refs.service.js.map