I have a function that can be used only inside a class and don\'t want it to be accessible outside the class.
class Auth { /*@ngInject*/ constructor($htt
You could use a Symbol:
const localFunc = Symbol(); class Auth { /*@ngInject*/ constructor($http, $cookies, $q, User) { this.$http = $http; this.$cookies = $cookies; this.$q = $q; this.User = User; this[localFunc] = function() { // I am private }; } }