How to use the angular.equals function in angular

To help you get started, we’ve selected a few angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openshift / origin-web-catalog / src / components / update-service / update-service.controller.ts View on Github external
_.each(this.secrets, (secret: any) => {
      var originalSecretParameters: any = JSON.parse(this.SecretsService.decodeSecretData(secret.data).parameters);
      var originalSecretKeys: any = _.map(originalSecretParameters, (value: any, key: string) => {
        // Make sure properties with a '.' in the name aren't treated as paths.
        return [key];
      });

      var updateSecretParameters: any = _.pick(parameterData, originalSecretKeys);
      newParameters = _.omit(newParameters, originalSecretKeys);

      if (!angular.equals(updateSecretParameters, originalSecretParameters)) {
        // Add the parameters to the new secret parameters
        angular.extend(updatedSecretParameters, updateSecretParameters);

        // Remove the reference to this secret
        updateInstance.spec.parametersFrom = _.reject(updateInstance.spec.parametersFrom, {secretKeyRef: {name: secret.metadata.name}});
      }
    });
github angular-gantt / angular-gantt / src / core / logic / row / rowsManager.factory.ts View on Github external
if (typeof(filterRowComparator) === 'function') {
        // fix issue this.gantt is undefined

        let gantt = this.gantt
        filterRowComparator = (actual, expected) => {
          // fix actual.model is undefined
          return gantt.options.value('filterRowComparator')(actual, expected)
        }
      }

      this.filteredRows = this.filterImpl(this.sortedRows, filterRow, filterRowComparator)
    } else {
      this.filteredRows = this.sortedRows.slice(0)
    }

    let raiseEvent = !angular.equals(oldFilteredRows, this.filteredRows)
    this.customFilteredRows = this.applyCustomRowFilters(this.filteredRows)

    // TODO: Implement rowLimit like columnLimit to enhance performance for gantt with many rows
    this.visibleRows = this.customFilteredRows;

    (this.gantt.api as any).rows.raise.displayed(this.sortedRows, this.filteredRows, this.visibleRows)

    if (raiseEvent) {
      (this.gantt.api as any).rows.raise.filter(this.sortedRows, this.filteredRows)
    }
  }
github esvit / ng-table / src / core / ngTableParams.js View on Github external
this.isDataReloadRequired = function () {
            // note: using != as want to treat null and undefined the same
            return !isCommittedDataset || !ng1.equals(createComparableParams(), prevParamsMemento)
                || hasGlobalSearchFieldChanges();
        };
        function createComparableParams() {
github spinnaker / deck / app / scripts / modules / netflix / fastProperties / domain / propertyCommand.model.ts View on Github external
public isMoveToNewScope(): boolean {
    if (this.scopes.length > 0 && this.originalScope) {
      return !equals(
        omit(this.scopes[0], ['instanceCounts', 'env']),
        omit(this.originalScope, ['instanceCounts', 'env'])
      );
    }
    return false;
  }
github ahoereth / spam / src / components / courses / filters / course.js View on Github external
const check = (term, comparator, value) => {
      term = term.replace(/[- ]/g, '_');

      if (comparator === '>' && term < value) {
        return false;
      } else if (comparator === '<' && term > value) {
        return false;
      } else if (comparator === '=' && !angular.equals(term, value)) {
        return false;
      } else if (comparator === '!' && angular.equals(term, value)) {
        return false;
      } else if ((comparator === null || comparator === '~') && value.indexOf(term) === -1) {
        return false;
      }

      return true;
    };
github ovh / manager / packages / manager / modules / emailpro / src / account / update / emailpro-account-update.controller.js View on Github external
needsUpdate() {
    const modifiedBuffer = this.selectedAccount;
    const result = !(
      !modifiedBuffer.password &&
      angular.equals(this.originalValues.login, modifiedBuffer.login) &&
      angular.equals(
        this.originalValues.displayName,
        modifiedBuffer.displayName,
      ) &&
      angular.equals(
        this.originalValues.completeDomain.name,
        modifiedBuffer.completeDomain.name,
      ) &&
      angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
      angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
      angular.equals(
        this.originalValues.hiddenFromGAL,
        modifiedBuffer.hiddenFromGAL,
      ) &&
      angular.equals(
        this.originalValues.accountLicense,
        modifiedBuffer.accountLicense,
      ) &&
      angular.equals(this.originalValues.quota, modifiedBuffer.quota)
    );
    return result && this.accountIsValid() && !this.takenEmailError;
github filipkis / endev / src / attributes / from.js View on Github external
      .find(function(key){return _.find(scope[key], function(value){return angular.equals(object,value)})})
      .value();
github ovh / manager / packages / manager / modules / emailpro / src / account / update / emailpro-account-update.controller.js View on Github external
needsUpdate() {
    const modifiedBuffer = this.selectedAccount;
    const result = !(
      !modifiedBuffer.password &&
      angular.equals(this.originalValues.login, modifiedBuffer.login) &&
      angular.equals(
        this.originalValues.displayName,
        modifiedBuffer.displayName,
      ) &&
      angular.equals(
        this.originalValues.completeDomain.name,
        modifiedBuffer.completeDomain.name,
      ) &&
      angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
      angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
      angular.equals(
        this.originalValues.hiddenFromGAL,
        modifiedBuffer.hiddenFromGAL,
      ) &&
      angular.equals(
        this.originalValues.accountLicense,
        modifiedBuffer.accountLicense,
      ) &&
      angular.equals(this.originalValues.quota, modifiedBuffer.quota)
    );
    return result && this.accountIsValid() && !this.takenEmailError;
  }
github ovh / manager / packages / manager / modules / emailpro / src / account / update / emailpro-account-update.controller.js View on Github external
angular.equals(this.originalValues.login, modifiedBuffer.login) &&
      angular.equals(
        this.originalValues.displayName,
        modifiedBuffer.displayName,
      ) &&
      angular.equals(
        this.originalValues.completeDomain.name,
        modifiedBuffer.completeDomain.name,
      ) &&
      angular.equals(this.originalValues.firstName, modifiedBuffer.firstName) &&
      angular.equals(this.originalValues.lastName, modifiedBuffer.lastName) &&
      angular.equals(
        this.originalValues.hiddenFromGAL,
        modifiedBuffer.hiddenFromGAL,
      ) &&
      angular.equals(
        this.originalValues.accountLicense,
        modifiedBuffer.accountLicense,
      ) &&
      angular.equals(this.originalValues.quota, modifiedBuffer.quota)
    );
    return result && this.accountIsValid() && !this.takenEmailError;
  }
github spinnaker / deck / app / scripts / modules / openstack / src / common / selectField.component.js View on Github external
return _.find(ctrl.options, function(o) {
      return angular.equals(o.value, value);
    });
  }