1

I developed several static pages with MEAN.js. I was trying to add jQuery Lightbox plugin into my project. jQuery Lightbox plugin has jQuery.lightbox.js and jQuery.lightbox.css.

Could you tell me on where I should put these files? I tried to put into /public/dist folder but the server could not load js and css files.

Colin Brock
  • 21,267
  • 9
  • 46
  • 61
ilikedev
  • 80
  • 5
  • 3
    You have to include them in your html too, not only in your file system – devqon Oct 15 '14 at 14:02
  • check this out, might be helpful: http://stackoverflow.com/questions/26498540/mean-js-where-is-the-main-html-file-index-html-located/26498962#26498962 – Gong Yibo Oct 22 '14 at 14:11

3 Answers3

4

You may want to look under the config folder. The config folder contains the files you need to configure your application. http://meanjs.org/docs.html#configuration

Css, js and other assets are all called in /config/env/all.js

per.eight
  • 428
  • 7
  • 17
0

You need something like this, but you need to rewrite the URLs of the scripts, if those scripts are not in the same directory as your html file. And of course, if you are using other version of jQuery, then need to rewrite that filename too.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" href="jQuery.lightbox.css" type="text/css">
        <script src="jquery-1.11.0.min.js" type="text/javascript"></script>
        <script src=" jQuery.lightbox.js" type="text/javascript"></script>
        <script type="text/javascript" src="MEAN.js"></script>
    </head>
    <body>

    </body>
</html>

Please check: http://www.w3schools.com/html/html_basic.asp

vaso123
  • 12,347
  • 4
  • 34
  • 64
0

You have to added in the client routes:modules/"application-module"/client/config/client.routes.js. refer to the below code.

    .state('dashboards.dashboard_2', {
        url: "/dashboard_2",
        templateUrl: "views/dashboard_2.html",
        data: { pageTitle: 'Dashboard 2' },
        resolve: {
            loadPlugin: function ($ocLazyLoad) {
                return $ocLazyLoad.load([
                    {
                        serie: true,
                        name: 'angular-flot',
                        files: [ 'js/plugins/flot/jquery.flot.js', 'js/plugins/flot/jquery.flot.time.js', 'js/plugins/flot/jquery.flot.tooltip.min.js', 'js/plugins/flot/jquery.flot.spline.js', 'js/plugins/flot/jquery.flot.resize.js', 'js/plugins/flot/jquery.flot.pie.js', 'js/plugins/flot/curvedLines.js', 'js/plugins/flot/angular-flot.js' ]
                    },
                    {
                        serie: true,
                        files: ['js/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js', 'js/plugins/jvectormap/jquery-jvectormap-2.0.2.css']
                    },
                    {
                        serie: true,
                        files: ['js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js']
                    },
                    {
                        name: 'ui.checkbox',
                        files: ['js/bootstrap/angular-bootstrap-checkbox.js']
                    }
                ]);
            }
        }
    })
Prem Sanil
  • 128
  • 8