0
votes

I am new to the mean stack and am trying to add ngSanitize. I installed on the command line and see the library inside /bower_components/ but the angular-sanitize.js script isn't loading on the app. Am I missing a step for this? I tried adding the module to the default modules in /public/init.js but still no luck.

The bower.json file looks correct too:

{ "name": "mean", "version": "0.4.0", "dependencies": { "jquery": "1.x", "jquery-ui": "~1.10.3", "angular": "latest", "angular-resource": "latest", "angular-cookies": "latest", "angular-mocks": "latest", "angular-route": "latest", "bootstrap": "3.1.1", "angular-bootstrap": "0.11.0", "angular-ui-router": "#master", "angular-sanitize": "~1.2.22" } }

1
make sure it is actually included in your index.htmlapairet
yeah that is the problem, all other scripts in bower_components are appeneded to the index.html file <script type="text/javascript" src="/bower_components/jquery/dist/jquery.min.js"></script>user1572796
Depending on your grunt config, running 'grunt serve' could append the automatically to index.htmlapairet
if your issue is solved, please accept the answerapairet

1 Answers

0
votes

Make sure ngSanitize is included in your index.html file. Running

bower install

will not do that automatically. Depending on your Gruntfile, running

grunt serve

might add it for you