I am not trying to develop an angular app. There is this website and I am trying to create a script to make myself click less when having to fill out form. However, the website is in Angular and I am having a hard time learning this, as I’ve done this before but only with normal HTML element. I am not a developer or anything.
The page is not recognised as an angular app as the heading is this
<html ng-app2="core"
Anyway, there is this drop down field with the below when inspected:
<select ng-if="vm.mode != 'view' && !vm.isEmptyObject(property.options)" ng-model="property.value" ng-options="option.id as option.label for option in property.options" ng-change="vm.statusChanged(property.value)" ng-required="property.mandatory" ng-selected="1" name="h_record_state" class="form-control ng-pristine ng-untouched ng-valid ng-scope ng-not-empty ng-valid-required" selected="selected" required="required" style="">
<option value="" class=""></option>
<option label="Current" value="string:0">Current</option>
<option label="Active" value="string:1" selected="selected">Active</option>
<option label="Archived" value="string:2">Archived</option>
</select>
I can get the scope of this field. But from there, I can’t see anything I can change
$$ChildScope: null
$$childHead: null
$$childTail: null
$$listenerCount: {$destroy: 2}
$$listeners: {$destroy: Array(2)}
$$nextSibling: null
$$prevSibling: m {$id: 724, $$childTail: null, $$childHead: null, $$prevSibling: null, $nextSibling: b, …}
$$transcluded: true
$$watchers: (6) [{…}, {…}, {…}, {…}, {…}, {…}]
$$watchersCount: 6
$id: 1083
$parent: m {$$childTail: b, $$childHead: m, $$nextSibling: null, $$watchers: Array(5), $$listeners: {…}, …}
[[Prototype]]: m
So, I can change the selected drop down with normal document.querySelector(Element).SelectedIndex
, but I cannot apply change to the form on the page when I click the Save (Submit) button.
I am struggling with the syntax to access the angular element and directives from within the console. There are other field/drop down and autocomplete fields on the page too but I want to get the basic to work first in the learning curve.
Read many guides or posts about scope(), apply() etc but I can’t get it to work with this page I want.
I really need a pointer on how to just use console to change and apply the value, as I don’t have access to the backend of this page, and most guides I’ve read were about how to do angular stuff when developing an app