0
Ich kann das simple Angular example nicht zum Funktionieren bringen.Eckiges Beispiel auf JSfiddle
Ich erhalte nicht erfasste Fehler: [$ Injektor: modulerr] Fehler beim Modul App instanziiert
HTML:
<div ng-app="app" ng-controller="Example">
<input type="text" placeholder="#1 Main Odd"
ui-blur="testfn('data.mainOdd1', $event, '#1 Main Odd');">
</div>
Javascript:
angular
.module('app', [])
.directive('uiBlur', function($parse) {
return function(scope, elem, attrs) {
elem.bind('blur', function(event) {
scope.$apply(function() {
$parse(attrs.uiBlur)(scope, {
$event: event
});
});
});
};
})
.controller('Example', function($scope) {
$scope.testfn = function(propertyName, $event, placeHolder) {
debugger;
console.log(propertyName, $event);
};
});
Was mache ich hier falsch ?
Dank
2 Sekunden später :) toller Fang – Tonino
@Tonino Danke :) – varit05