Hi there,
I'm currently in need of ngSanitize for an Angular project. But I dont get it to work.
I'm using the requirejs-angular-seed from
https://github.com/angular/angular-seedThe thing is, I have to use 'ng-bind-html' and therefore I need to import the angular-sanitize module.
But with requireJS it never seems to get loaded.... this is my require-configuration-file:
require.config({
paths: {
angular: '../bower_components/angular/angular',
angularSanitize: '../bower_components/angular-sanitize/angular-sanitize'
},
shim: {
'angular' : {'exports' : 'angular'},
'angularSanitize' : {'deps' : 'angular'}
},
priority: [
"angular"
]
});
//
http://code.angularjs.org/1.2.1/docs/guide/bootstrap#overview_deferred-bootstrapwindow.name = "NG_DEFER_BOOTSTRAP!";
require( [
'angular',
'app'
], function(angular, app) {
'use strict';
var $html = angular.element(document.getElementsByTagName('html')[0]);
angular.element().ready(function() {
angular.resumeBootstrap([app['name']]);
});
});
I dont know how to make angular-sanitize work with requireJS? Any recommendations or best practices?
Thanks in advance and cheers,
Martin