Reason for using array notation when defining AngularJS Controller

后端 未结 4 1616
感情败类
感情败类 2020-11-29 02:15

Apologies if this question sounds too obvious.

I\'ve recently starting exploring and learning AngularJS. I\'ve gone through some good tutorials -

  • Off
4条回答
  •  抹茶落季
    2020-11-29 02:37

    I have a great and complex AngularJS project, so making manually the changes the all the codes would have been a big pain. But I solved using babel-plugin-angularjs-annotate.

    Install the plugin:

    $ npm install babel-plugin-angularjs-annotate --save-dev
    

    and then add the plugin to the .babelrc file:

    {
      "presets": ["@babel/preset-env"],
      "plugins": ["angularjs-annotate"]
    }
    

提交回复
热议问题