When I add the "underscore.string" library in my controller everything in the page disappears. I used this thread on stackoverflow to inject underscore to my controller.
This is my controller:
var underscore = angular.module('underscore', []);
underscore.factory('_', ['$window', function($window) {
return $window._; // assumes underscore has already been loaded on the page
}]);
angular.module('weatherApp', ['underscore'])
.controller('MainCtrl', ['$scope', '$log', 'weatherService','_', function ($scope, $log, weatherService, _) { //controller code}
I have a main index.html and a main.html. main html is inside of a div in index.html.
What might be the problem? There are no errors on the console.