adding ngsanitize to mean.io

264 Views Asked by At

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

There are 1 best solutions below

2
apairet On

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