How to check whether the value of my scope data is changed or not in angularjs? -


Text after "itemprop =" text ">

I have created an HTML for" drop-down "html / partials / institutions / coordinator.dropdown.html

  & lt; Div class = "dropdown" ng-click = "toggle dropdown" & gt; & Lt; Button class = "form control overflow" type = "button" id = "dropdown menu =" data-toggle = "dropdown" name = "datatype" id = "datatype" ng-required = "true" ng range = "{' Selected-class-name ': $ index == selected index} "ng-model =" coordinator.fol "ng-bind =" coordinator.follow "required & gt; & Lt; / Button & gt; & Lt; Ul class = "drop-menu dropdown-menu-list" role = "menu" aria-labelledby = "dropdown menu-list" ng-init = "toggleDropDown = true" ng show = "toggleDropDown" & gt; & Lt; Li role = "presentation" ng-repeat = "item in role" value = "{{item.roleid}}" ng-click = "changeCoordinatorType (item.value, $ index)" & gt; & Lt; Span ng-class = "{'dropdown-selected-item': $ index == selectedIndex}" & gt; {{Item.coordinator_type}} & lt; / Span & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;  

In my basic HTML I am using it as below:

  & lt; Div class = "col-md-6" & gt; & Lt; Div class = "error-message" & gt; & Lt; Period ng show = "addCoordinatorForm.coordinatorType $ error.required & amp;! Amp;! AddCoordinatorForm.coordinatorType $ antique" class = "error message" ng-dam = "'Select a coordinator type.' '& Gt; & lt; / span & gt; / div & gt; & lt; div name = "coordinator type" ng-include = "' partial / entities / coordinator drop-down html '" & gt;  

Now in my controller,

I need to check that $ scope.coordinator Whether the role value is changed or not.

When I give the controller in my

  if ($ scope.addCoordinatorForm. $ Dirty) {}  

Checking other controls, but no hanging price has changed or not.

Does anyone suggest a suggestion for me Can?


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -