Is it possible to include AngularJs to a project with Gradle

前端 未结 4 726
南笙
南笙 2020-12-29 13:39

I know that it is possible to include AngularJs with Maven into a Spring project for instance but how would one include it with Gradle?

Looking into gradle repositor

4条回答
  •  误落风尘
    2020-12-29 14:02

    Check out webjars, i highly recommend it.

    I've just used it in Maven and Gradle project.
    Basically it is just what we needed, a vast collection of front-end projects and frameworks packaged in jars.

    • Add this dependency to your build.gradle script:

      compile 'org.webjars:angularjs:1.3.14'

    • Go to documentation section for a quick setup guide for Spring

    • include angular.js or some other module from the jar in you script like a local resource

    • Or optionaly require it from require.js script

提交回复
热议问题