TypeError: g.rangy.saveSelection is not a function using textangular + rangy + browserify
问题 I am trying to implement textAngular into my Angular.js project that is packaged using browserify . I installed rangy and textAngular via npm . They are included like this: global.rangy = require('rangy'); require('angular-sanitize'); require('textangular'); When compiling the package with browserify via gulp , no errors are shown. However, as soon as I click on a button in the toolbar of the editor, I get the following error: TypeError: g.rangy.saveSelection is not a function at Scope.m