Error: [$compile:multidir] Multiple directives [form, form] asking for 'form' controller on: <form ng-form=“”>

前端 未结 3 1806
忘了有多久
忘了有多久 2021-01-18 05:17

I am getting this error on a form I am building in angularjs.

`Error: [$compile:multidir] Multiple directives [form, form] asking for \'form\' controller on:

<
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 05:50

    I encountered the same problem when I set my component name to form.

    angular.module("testApp").component("form", {
       ...
    });
    

    Effect was the similar as in @user553086 answer. Change component's name solves the problem.

提交回复
热议问题