ngDialog in mean.js application

前端 未结 3 826
北荒
北荒 2020-12-21 06:40

I have created a webapp with MeanJS. I want to use ngDialog in the application, but not sure how and where to add the ngDialog.js in the application. Im trying to inject the

3条回答
  •  [愿得一人]
    2020-12-21 07:09

    The original answer is still correct but for the new Mean.js 0.4 some stuff changed.

    You still use

    bower install --save ngDialog
    

    to install ngDialog.

    To add the dependency 'ngDialog' go to modules/core/client/app/config.js and add

    var applicationModuleVendorDependencies = ['ngResource', 'ngCookies', 'ngAnimate', 'ngTouch', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'ui.utils', 'ngDialog'];
    

    Then this is where I struggled.

    To include ngDialog's CSS and JavaScript file into the HTML template of the Angular application go to

    config/assets/default.js

    and under client.lib.css add 'public/lib/ng-dialog/css/ngDialog.min.css'

    and client.lib.js add 'public/lib/ng-dialog/js/ngDialog.min.js' .

    Note that the path of ngDialog changed to ng-dialog.

提交回复
热议问题