Correct usage of angular.element

The $element usage here was incorrect ($element is not callable),
the code actually wanted to use angular.element()

This resulted in the image format element not updating correctly,
and the selenium test failing (correctly).

Change-Id: I2ffbcc831b3ff42c4f5d1caeaed56e0c2048fa61
Partial-Bug: 1475387
This commit is contained in:
Richard Jones 2015-08-31 14:20:17 +10:00
parent 3915c85565
commit 46e396d7c0
1 changed files with 3 additions and 5 deletions

View File

@ -18,12 +18,10 @@
.module('horizon.app.tech-debt')
.controller('ImageFormController', ImageFormController);
ImageFormController.$inject = ['$element'];
function ImageFormController($element) {
function ImageFormController() {
var ctrl = this;
ctrl.copyFrom = $element('.image_url').val();
ctrl.diskFormat = $element('.disk_format').val();
ctrl.copyFrom = angular.element('.image_url').val();
ctrl.diskFormat = angular.element('.disk_format').val();
ctrl.selectImageFormat = function (path) {
if (!path) { return; }
var format = path.substr(path.lastIndexOf(".") + 1)