@osovitny/anatoly 2.14.27 → 2.14.28
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/ui/forms/components/urlslug/urlslug.component.mjs +9 -12
- package/fesm2015/osovitny-anatoly.mjs +8 -11
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +8 -11
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/ui/forms/components/urlslug/urlslug.component.d.ts +4 -5
- package/package.json +1 -1
|
@@ -3896,17 +3896,6 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3896
3896
|
//Outputs
|
|
3897
3897
|
this.generating = new EventEmitter();
|
|
3898
3898
|
}
|
|
3899
|
-
ngAfterViewInit() {
|
|
3900
|
-
this.setWatchers();
|
|
3901
|
-
}
|
|
3902
|
-
setWatchers() {
|
|
3903
|
-
if (this.watchedControlName) {
|
|
3904
|
-
this.formGroup.get(this.watchedControlName).valueChanges.subscribe(val => {
|
|
3905
|
-
let text = this.getFormValue(this.watchedControlName);
|
|
3906
|
-
this.generateUrlSlug(text);
|
|
3907
|
-
});
|
|
3908
|
-
}
|
|
3909
|
-
}
|
|
3910
3899
|
generateUrlSlug(text) {
|
|
3911
3900
|
let slugedText = Utils.slugify(text);
|
|
3912
3901
|
let event = { urlSlug: slugedText };
|
|
@@ -3914,6 +3903,14 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3914
3903
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
3915
3904
|
this.hrefGo = `${event.urlSlug}`;
|
|
3916
3905
|
}
|
|
3906
|
+
startWatching() {
|
|
3907
|
+
if (this.watchedControlName) {
|
|
3908
|
+
this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
|
|
3909
|
+
this.generateUrlSlug(value);
|
|
3910
|
+
});
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
//Events
|
|
3917
3914
|
onUrlSlugChange() {
|
|
3918
3915
|
let text = this.getFormValue(this.controlName);
|
|
3919
3916
|
this.generateUrlSlug(text);
|