@osovitny/anatoly 2.14.39 → 2.14.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/core/dom.mjs +1 -2
- package/esm2020/lib/core/localization/localizationSettings.module.mjs +10 -6
- package/esm2020/lib/core/services/appcontext.service.mjs +5 -4
- package/esm2020/lib/core/services/google-analytics.service.mjs +8 -6
- package/esm2020/lib/core/services/idle.service.mjs +14 -10
- package/esm2020/lib/core/subs.mjs +1 -1
- package/esm2020/lib/data/base/grid/base-grid-edit.service.mjs +21 -14
- package/esm2020/lib/data/base/grid/base-grid-read.service.mjs +11 -8
- package/esm2020/lib/data/services/core-api.service.mjs +19 -4
- package/esm2020/lib/data/services/emails-api.service.mjs +10 -7
- package/esm2020/lib/ui/components/spinners/loading/loading.component.mjs +5 -3
- package/esm2020/lib/ui/components/spinners/pagespinner/pagespinner.component.mjs +13 -10
- package/esm2020/lib/ui/forms/components/urlslug/urlslug.component.mjs +12 -8
- package/fesm2015/osovitny-anatoly.mjs +126 -79
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +126 -79
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/ui/components/spinners/pagespinner/pagespinner.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -44,15 +44,19 @@ export class UrlSlugComponent extends BaseEditComponent {
|
|
|
44
44
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
45
45
|
}
|
|
46
46
|
startWatching() {
|
|
47
|
-
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe(
|
|
48
|
-
|
|
49
|
-
this.firstValue
|
|
50
|
-
|
|
47
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
48
|
+
next: (value) => {
|
|
49
|
+
if (this.firstValue) {
|
|
50
|
+
this.firstValue = false;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.generateUrlSlug(value);
|
|
51
54
|
}
|
|
52
|
-
this.generateUrlSlug(value);
|
|
53
55
|
});
|
|
54
|
-
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe(
|
|
55
|
-
|
|
56
|
+
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
57
|
+
next: (value) => {
|
|
58
|
+
this.hrefGo = value;
|
|
59
|
+
}
|
|
56
60
|
});
|
|
57
61
|
}
|
|
58
62
|
//Events
|
|
@@ -85,4 +89,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
85
89
|
}], generating: [{
|
|
86
90
|
type: Output
|
|
87
91
|
}] } });
|
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
92
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsc2x1Zy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvZm9ybXMvY29tcG9uZW50cy91cmxzbHVnL3VybHNsdWcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hdG9seS9zcmMvbGliL3VpL2Zvcm1zL2NvbXBvbmVudHMvdXJsc2x1Zy91cmxzbHVnLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsTUFBTTtBQUNOLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQXFCLE1BQU0sZUFBZSxDQUFDO0FBRTFGLEtBQUs7QUFDTCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx5Q0FBeUMsQ0FBQztBQUM1R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yXG4gICAgICAgIDxzcGFuIGNsYXNzPVwidXJsUHJlZml4XCI+XHJcbiAgICAgICAgICB7eyB1cmxQcmVmaXggfX1cclxuICAgICAgICA8L3NwYW4+XHJcbiAgICAgIDwvbGFiZWw+XHJcbiAgICA8L2Rpdj5cclxuICAgIDxkaXYgY2xhc3M9J2Zvcm0tZ3JvdXAgZmxleC1maWxsJz5cclxuICAgICAgPGlucHV0IFtmb3JtQ29udHJvbE5hbWVdPSdjb250cm9sTmFtZScgdHlwZT0ndGV4dCcgcGxhY2Vob2xkZXI9J1R5cGUgdXJsIHNsdWcgaGVyZScgKGZvY3Vzb3V0KT0nb25VcmxTbHVnQ2hhbmdlKCknXHJcbiAgICAgICAgY2xhc3M9J2Zvcm0tY29udHJvbCcgLz5cclxuICAgIDwvZGl2PlxyXG4gICAgPGRpdiBjbGFzcz1cImZvcm0tZ3JvdXAgZmxleC1zaHJpbmstMVwiICpuZ0lmPVwiaXNHb0J1dHRvblZpc2libGVcIj5cclxuICAgICAgPGEgaHJlZj1cInt7dXJsUHJlZml4fX17e2hyZWZHb319XCIgdGFyZ2V0PVwiX2JsYW5rXCIgY2xhc3M9XCJidG4gYnRuLXByaW1hcnlcIj5HbzwvYT5cclxuICAgIDwvZGl2PlxyXG4gICAgPGFuYXRvbHktaXRlbS12YWxpZGF0aW9uLXN1bW1hcnkgW2Zvcm1Hcm91cF09J2Zvcm1Hcm91cCcgW2Zvcm1TdWJtaXR0ZWRdPSdmb3JtU3VibWl0dGVkJyBbY29udHJvbE5hbWVdPSdjb250cm9sTmFtZSdcclxuICAgICAgW2NvbnRyb2xUaXRsZV09J2NvbnRyb2xUaXRsZSc+XHJcbiAgICA8L2FuYXRvbHktaXRlbS12YWxpZGF0aW9uLXN1bW1hcnk+XHJcbiAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -18,7 +18,6 @@ import Swal from 'sweetalert2';
|
|
|
18
18
|
import { v4 } from 'uuid';
|
|
19
19
|
import * as i1$2 from 'ngx-toastr';
|
|
20
20
|
import * as i1$4 from '@angular/platform-browser';
|
|
21
|
-
import * as $$1 from 'jquery';
|
|
22
21
|
import * as i1$6 from '@angular/forms';
|
|
23
22
|
import { FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
24
23
|
import * as i1$7 from 'angular-froala-wysiwyg';
|
|
@@ -683,11 +682,15 @@ function localizationInitializerFactory(translate, localizationService, injector
|
|
|
683
682
|
let locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
|
|
684
683
|
locationInitialized.then(() => {
|
|
685
684
|
let languageToSet = localizationService.configureTranslationSettings(translate);
|
|
686
|
-
translate.use(languageToSet).subscribe(
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
685
|
+
translate.use(languageToSet).subscribe({
|
|
686
|
+
next: (data) => {
|
|
687
|
+
},
|
|
688
|
+
error: (e) => {
|
|
689
|
+
resolve(null);
|
|
690
|
+
},
|
|
691
|
+
complete: () => {
|
|
692
|
+
resolve(null);
|
|
693
|
+
}
|
|
691
694
|
});
|
|
692
695
|
});
|
|
693
696
|
});
|
|
@@ -1421,9 +1424,10 @@ class AppContextService extends BaseApiService {
|
|
|
1421
1424
|
}
|
|
1422
1425
|
let now = new Date();
|
|
1423
1426
|
console.log('Requesting a new AppContext at ' + now);
|
|
1424
|
-
this.subscription = this.get('getCurrentContext', null).subscribe(
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
+
this.subscription = this.get('getCurrentContext', null).subscribe({
|
|
1428
|
+
next: (data) => {
|
|
1429
|
+
this.dataReceived(data);
|
|
1430
|
+
}
|
|
1427
1431
|
});
|
|
1428
1432
|
}
|
|
1429
1433
|
updateCurrent(success = null) {
|
|
@@ -1483,13 +1487,15 @@ class IdleService {
|
|
|
1483
1487
|
this.startDate = new Date();
|
|
1484
1488
|
}
|
|
1485
1489
|
startTimer() {
|
|
1486
|
-
this.timer$ = timer(this.timeOutMilliSeconds, 1 * 1000).subscribe(
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1490
|
+
this.timer$ = timer(this.timeOutMilliSeconds, 1 * 1000).subscribe({
|
|
1491
|
+
next: (data) => {
|
|
1492
|
+
let nowDate = new Date();
|
|
1493
|
+
let exiredDate = new Date(this.startDate.getTime() + this.timeOutMilliSeconds);
|
|
1494
|
+
if (nowDate.getTime() >= exiredDate.getTime()) {
|
|
1495
|
+
//console.log("nowDate: " + nowDate);
|
|
1496
|
+
//console.log("exiredDate: " + exiredDate);
|
|
1497
|
+
this.expired$.next(true);
|
|
1498
|
+
}
|
|
1493
1499
|
}
|
|
1494
1500
|
});
|
|
1495
1501
|
}
|
|
@@ -1500,8 +1506,10 @@ class IdleService {
|
|
|
1500
1506
|
startWatching(timeOutSeconds) {
|
|
1501
1507
|
this.idle$ = merge(fromEvent(document, 'mousemove'), fromEvent(document, 'click'), fromEvent(document, 'mousedown'), fromEvent(document, 'keypress'), fromEvent(document, 'DOMMouseScroll'), fromEvent(document, 'mousewheel'), fromEvent(document, 'touchmove'), fromEvent(document, 'MSPointerMove'), fromEvent(window, 'mousemove'), fromEvent(window, 'resize'));
|
|
1502
1508
|
this.resetTimeCounters(timeOutSeconds);
|
|
1503
|
-
this.idleSubscription = this.idle$.subscribe(
|
|
1504
|
-
|
|
1509
|
+
this.idleSubscription = this.idle$.subscribe({
|
|
1510
|
+
next: (data) => {
|
|
1511
|
+
this.resetTimer();
|
|
1512
|
+
}
|
|
1505
1513
|
});
|
|
1506
1514
|
this.startTimer();
|
|
1507
1515
|
return this.expired$;
|
|
@@ -1616,11 +1624,13 @@ class GoogleAnalyticsService {
|
|
|
1616
1624
|
*/
|
|
1617
1625
|
}
|
|
1618
1626
|
subscribe() {
|
|
1619
|
-
this.subscription = this.router.events.subscribe(
|
|
1620
|
-
|
|
1621
|
-
if (
|
|
1622
|
-
window.ga
|
|
1623
|
-
|
|
1627
|
+
this.subscription = this.router.events.subscribe({
|
|
1628
|
+
next: (event) => {
|
|
1629
|
+
if (event instanceof NavigationEnd) {
|
|
1630
|
+
if (window.ga) {
|
|
1631
|
+
window.ga('set', 'page', event.urlAfterRedirects);
|
|
1632
|
+
window.ga('send', 'pageview');
|
|
1633
|
+
}
|
|
1624
1634
|
}
|
|
1625
1635
|
}
|
|
1626
1636
|
});
|
|
@@ -1699,11 +1709,11 @@ class DOM {
|
|
|
1699
1709
|
return this.dir(elem, "parentNode", null, selector);
|
|
1700
1710
|
}
|
|
1701
1711
|
static findInDocument(selector) {
|
|
1702
|
-
let parent =
|
|
1703
|
-
return
|
|
1712
|
+
let parent = $(document);
|
|
1713
|
+
return $(parent).find(selector).get();
|
|
1704
1714
|
}
|
|
1705
1715
|
static find(elem, selector) {
|
|
1706
|
-
return
|
|
1716
|
+
return $(elem).find(selector).get();
|
|
1707
1717
|
}
|
|
1708
1718
|
static remove(nodes) {
|
|
1709
1719
|
if (nodes == null) {
|
|
@@ -1730,13 +1740,13 @@ class DOM {
|
|
|
1730
1740
|
this.remove(this.find(element, selector));
|
|
1731
1741
|
}
|
|
1732
1742
|
static show(elem) {
|
|
1733
|
-
|
|
1743
|
+
$(elem).show();
|
|
1734
1744
|
}
|
|
1735
1745
|
static hide(elem) {
|
|
1736
|
-
|
|
1746
|
+
$(elem).hide();
|
|
1737
1747
|
}
|
|
1738
1748
|
static each(selector, action) {
|
|
1739
|
-
let parent =
|
|
1749
|
+
let parent = $(document);
|
|
1740
1750
|
let elems = DOM.find(parent, selector);
|
|
1741
1751
|
for (let i = 0; i < elems.length; i++) {
|
|
1742
1752
|
let elem = elems[i];
|
|
@@ -1780,13 +1790,13 @@ class DOM {
|
|
|
1780
1790
|
}
|
|
1781
1791
|
*/
|
|
1782
1792
|
static addClass(elem, classNames) {
|
|
1783
|
-
|
|
1793
|
+
$(elem).addClass(classNames);
|
|
1784
1794
|
}
|
|
1785
1795
|
static removeClass(elem, classNames) {
|
|
1786
|
-
|
|
1796
|
+
$(elem).removeClass(classNames);
|
|
1787
1797
|
}
|
|
1788
1798
|
static hasClass(elem, className) {
|
|
1789
|
-
|
|
1799
|
+
$(elem).hasClass(className);
|
|
1790
1800
|
}
|
|
1791
1801
|
}
|
|
1792
1802
|
|
|
@@ -1955,13 +1965,16 @@ class BaseGridReadService extends BehaviorSubject {
|
|
|
1955
1965
|
url = this.baseReadUrl + `${this.serializeParams(params)}`;
|
|
1956
1966
|
this.savedReadParams = params;
|
|
1957
1967
|
}
|
|
1958
|
-
this.http.get(url).pipe(map(res => res)).subscribe(
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
success
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1968
|
+
this.http.get(url).pipe(map(res => res)).subscribe({
|
|
1969
|
+
next: (data) => {
|
|
1970
|
+
super.next(data);
|
|
1971
|
+
if (success)
|
|
1972
|
+
success();
|
|
1973
|
+
},
|
|
1974
|
+
error: (e) => {
|
|
1975
|
+
if (error)
|
|
1976
|
+
error(e);
|
|
1977
|
+
}
|
|
1965
1978
|
});
|
|
1966
1979
|
}
|
|
1967
1980
|
}
|
|
@@ -2007,24 +2020,31 @@ class BaseGridEditService extends BaseGridReadService {
|
|
|
2007
2020
|
save(data, isNew, sucess) {
|
|
2008
2021
|
const action = isNew ? 'add' : 'update';
|
|
2009
2022
|
this.reset();
|
|
2010
|
-
this.post(action, data).subscribe(
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2023
|
+
this.post(action, data).subscribe({
|
|
2024
|
+
next: (data) => {
|
|
2025
|
+
},
|
|
2026
|
+
error: (e) => {
|
|
2027
|
+
this.read();
|
|
2028
|
+
},
|
|
2029
|
+
complete: () => {
|
|
2030
|
+
this.read();
|
|
2031
|
+
if (sucess)
|
|
2032
|
+
sucess();
|
|
2033
|
+
}
|
|
2017
2034
|
});
|
|
2018
2035
|
}
|
|
2019
2036
|
delete(data, sucess) {
|
|
2020
2037
|
this.reset();
|
|
2021
2038
|
const url = `${this.baseUrl}/delete${this.serializeParams(data)}`;
|
|
2022
|
-
return this.http.delete(url).subscribe(
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
sucess
|
|
2026
|
-
|
|
2027
|
-
|
|
2039
|
+
return this.http.delete(url).subscribe({
|
|
2040
|
+
next: (data) => {
|
|
2041
|
+
this.read();
|
|
2042
|
+
if (sucess)
|
|
2043
|
+
sucess();
|
|
2044
|
+
},
|
|
2045
|
+
error: (e) => {
|
|
2046
|
+
this.read();
|
|
2047
|
+
}
|
|
2028
2048
|
});
|
|
2029
2049
|
}
|
|
2030
2050
|
post(action, data) {
|
|
@@ -2118,12 +2138,15 @@ class EmailsApiService extends BaseApiService {
|
|
|
2118
2138
|
this.baseUrl = Consts.emailsApiPath;
|
|
2119
2139
|
}
|
|
2120
2140
|
sendContactUs(captcha, name, email, topic, subject, message, success, error) {
|
|
2121
|
-
return this.post('sendContactUs', { captcha, name, email, topic, subject, message }).subscribe(
|
|
2122
|
-
|
|
2123
|
-
success
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2141
|
+
return this.post('sendContactUs', { captcha, name, email, topic, subject, message }).subscribe({
|
|
2142
|
+
next: (data) => {
|
|
2143
|
+
if (success)
|
|
2144
|
+
success(data);
|
|
2145
|
+
},
|
|
2146
|
+
error: (e) => {
|
|
2147
|
+
if (error)
|
|
2148
|
+
error(e);
|
|
2149
|
+
}
|
|
2127
2150
|
});
|
|
2128
2151
|
}
|
|
2129
2152
|
}
|
|
@@ -2155,13 +2178,28 @@ class CoreApiService extends BaseApiService {
|
|
|
2155
2178
|
this.baseUrl = Consts.coreApiPath;
|
|
2156
2179
|
}
|
|
2157
2180
|
getTimezonesJsonFile(done) {
|
|
2158
|
-
this.getExternalJsonFile('anatoly', 'timezones.json').subscribe(
|
|
2181
|
+
this.getExternalJsonFile('anatoly', 'timezones.json').subscribe({
|
|
2182
|
+
next: (data) => {
|
|
2183
|
+
if (done)
|
|
2184
|
+
done(data);
|
|
2185
|
+
}
|
|
2186
|
+
});
|
|
2159
2187
|
}
|
|
2160
2188
|
getUSStatesJsonFile(done) {
|
|
2161
|
-
this.getExternalJsonFile('anatoly', 'usStates.json').subscribe(
|
|
2189
|
+
this.getExternalJsonFile('anatoly', 'usStates.json').subscribe({
|
|
2190
|
+
next: (data) => {
|
|
2191
|
+
if (done)
|
|
2192
|
+
done(data);
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
2162
2195
|
}
|
|
2163
2196
|
getCountriesJsonFile(done) {
|
|
2164
|
-
this.getExternalJsonFile('anatoly', 'countries.json').subscribe(
|
|
2197
|
+
this.getExternalJsonFile('anatoly', 'countries.json').subscribe({
|
|
2198
|
+
next: (data) => {
|
|
2199
|
+
if (done)
|
|
2200
|
+
done(data);
|
|
2201
|
+
}
|
|
2202
|
+
});
|
|
2165
2203
|
}
|
|
2166
2204
|
}
|
|
2167
2205
|
CoreApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: CoreApiService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -3116,8 +3154,10 @@ class LoadingComponent {
|
|
|
3116
3154
|
this.show = false;
|
|
3117
3155
|
}
|
|
3118
3156
|
ngOnInit() {
|
|
3119
|
-
this.subs.sink = this.loadingService.subscribe(
|
|
3120
|
-
|
|
3157
|
+
this.subs.sink = this.loadingService.subscribe({
|
|
3158
|
+
next: (data) => {
|
|
3159
|
+
this.show = data;
|
|
3160
|
+
}
|
|
3121
3161
|
});
|
|
3122
3162
|
}
|
|
3123
3163
|
ngOnDestroy() {
|
|
@@ -3162,19 +3202,22 @@ class PageSpinnerComponent {
|
|
|
3162
3202
|
constructor(router, document) {
|
|
3163
3203
|
this.router = router;
|
|
3164
3204
|
this.document = document;
|
|
3165
|
-
this.backgroundColor = '#2196f3';
|
|
3166
|
-
this.spinner = Spinkit.skLine;
|
|
3167
3205
|
this.isSpinnerVisible = true;
|
|
3168
3206
|
this.Spinkit = Spinkit;
|
|
3169
|
-
this.
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3207
|
+
this.backgroundColor = '#2196f3';
|
|
3208
|
+
this.spinner = Spinkit.skLine;
|
|
3209
|
+
this.router.events.subscribe({
|
|
3210
|
+
next: (event) => {
|
|
3211
|
+
if (event instanceof NavigationStart) {
|
|
3212
|
+
this.isSpinnerVisible = true;
|
|
3213
|
+
}
|
|
3214
|
+
else if (event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError) {
|
|
3215
|
+
this.isSpinnerVisible = false;
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
error: (e) => {
|
|
3174
3219
|
this.isSpinnerVisible = false;
|
|
3175
3220
|
}
|
|
3176
|
-
}, () => {
|
|
3177
|
-
this.isSpinnerVisible = false;
|
|
3178
3221
|
});
|
|
3179
3222
|
}
|
|
3180
3223
|
ngOnDestroy() {
|
|
@@ -3808,15 +3851,19 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3808
3851
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
3809
3852
|
}
|
|
3810
3853
|
startWatching() {
|
|
3811
|
-
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe(
|
|
3812
|
-
|
|
3813
|
-
this.firstValue
|
|
3814
|
-
|
|
3854
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
3855
|
+
next: (value) => {
|
|
3856
|
+
if (this.firstValue) {
|
|
3857
|
+
this.firstValue = false;
|
|
3858
|
+
return;
|
|
3859
|
+
}
|
|
3860
|
+
this.generateUrlSlug(value);
|
|
3815
3861
|
}
|
|
3816
|
-
this.generateUrlSlug(value);
|
|
3817
3862
|
});
|
|
3818
|
-
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe(
|
|
3819
|
-
|
|
3863
|
+
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
3864
|
+
next: (value) => {
|
|
3865
|
+
this.hrefGo = value;
|
|
3866
|
+
}
|
|
3820
3867
|
});
|
|
3821
3868
|
}
|
|
3822
3869
|
//Events
|