How to add ngAnimate module?

  • How can I add the ngAnimate module?

    I’ve tried to add ngAnimate javascript component and add it to ons.bootstrap function but it doesn’t seem to work.

  • @antoniomc said:

    add the ngAnimate module

    <!DOCTYPE html>
    <meta charset="UTF-8">
    <script type="text/javascript" src="angular.min.js"></script>
    <script type="text/javascript" src="angular-sanitize.min.js"></script>
     <script type="text/javascript" src="angular-animate.min.js"></script>
     <script type="text/javascript" src="app.js"></script>
    <div ng-app="MyApp" ng-controller="MyCtrl">
    var nameSpace = angular.module('MyApp', ['ngSanitize','ngAnimate']);
    nameSpace.controller('MyCtrl',['$scope',function($scope) {
        $scope.item={ 'title' : 'Show a text' };

  • Monaca

    @Leonardo-Augusto said:


    Just remember to include ngSanitize module into your HTML, after angular, as it’s not included by default into the Angular lib.

    <script src=""></script>

  • @Andi thanks for remember!

  • Monaca

    You are welcome! :)
    I had to deal with it just a few days ago :P

  • I know you guys like Angular, but I sure would like to convince you to the dark side errr, the vanilla side! :stuck_out_tongue:

  • Monaca

    @munsterlander I’m actually trying to switch totally to vanilla js but I still find some Angular’s functionalities, like two-way binding, very useful :P

  • Onsen UI

    @munsterlander After writing the last To-Do List app in Vanilla JS I don’t want to go back to AngularJS anymore. In Onsen UI 2.0 Vanilla JS rocks :smirk:

  • @Fran-Diox I agree 100%! I like frameworks, but now with promises and all that you guys have been implementing, there is no need to rely on anything else. The only advantage Angular has is data binding, but this is solved by using your own listeners. Much much more granular control, cleaner code, and in my opinion far less code as well which then would mean performance gains for not loading additional unused items to memory. Love love love what the Onsen team is doing! Amazing stuff and great job! :heartpulse: :bowtie:

  • @munsterlander lol Yes i like Angular. But you and @Fran-Diox always talk about Vanilla! So i’ll check .


    I know you guys like Angular, but I sure would like to convince you to the dark side errr, the vanilla side! :stuck_out_tongue:

  • Onsen UI

    @Leonardo-Augusto I think Angular is quite heavy for simple apps. Most of the things you want to do are probably made easier with Vanilla so there is no need to make the code more complex. But of course it depends on the app and the developer :)

  • @Fran-Diox thanks for ur comment!

Log in to reply