can I use EJS with AngularJS?

后端 未结 2 728
情话喂你
情话喂你 2020-12-29 06:30

Hi I am new to AngularJS. I have great web app already running with JQuery and jQuery UI.

Now I want to completely get rid of JQuery and am going to migrate to Ang

相关标签:
2条回答
  • 2020-12-29 06:44

    You can use EJS (server or client side) in combination with Angular but there's no need and you'll probably overcomplicate things. AngularJS is very capable for manipulating the DOM by itself in a very separation of concerns kind of way. The most elegant way to work with Angular is to have a RESTful backend and just serve some static html/js files from a webserver.

    As for endless scrolling, there are tons of ready to use plugins (modules) to choose from or you can write your own. Basically this will need a view with a ng-repeat directive to display the currently loaded items and a directive that will notify a controller/scope to load more items when the user is scrolling down. A nice simple article can be found here.

    Similar questions:

    • Mixing angular and asp.net mvc webapi
    • Actual use of jade template and angularjs
    0 讨论(0)
  • 2020-12-29 06:55

    Yes of course you can use EJS with Angular JS. You might want to have a look at this;

    https://gist.github.com/jrmoran/4277025

    And about your DOM manipulation question. Yes you can append DOM dynamically using Angular JS. Angular JS have a strong feature of two way data binding which dynamically updates its DOM content when a model variable changes.

    Have a look at this:

    http://docs.angularjs.org/guide/databinding

    0 讨论(0)
提交回复
热议问题