请帮帮我 错误无法读取角度js中未定义的属性“substring”
myApp.controller('helpcontoller', ['$scope','$element','$log',
function ($scope, $element, $log, $attr, str) {
var myElements = $( ".helppageurl" );
for(i = 0; myElements.length>0; i++){
var gethref = $(myElements[i]).attr('src');
var res = gethref.substring(5);
myElements[i].setAttribute('src', res);
}
}
]);