AngularJS: Error: No controller: form
问题 HTML: <div ng-app="my-app" ng-controller="AppController"> <ng-form name="myform"> <gtux-el></gtux-el> </ng-form> </div> JS var app = angular.module('my-app', [], function () { }) app.controller('AppController', function ($scope) { }) app.directive('gtInputMsg', ['$compile', '$interpolate', '$log', function($compile, $interpolate, $log) { function link($scope, element, attrs, ctrls) { var modelCtrl = ctrls[0], formCtrl = ctrls[1], msgCtrl = ctrls[2]; element.on('click', function() { console