GUAC-605: Allow non-root scope for client and tunnel factories.
This commit is contained in:
1 parent
777761a616
commit
1a69a12c61
3 files changed
+14
-4
No files matched your search
@@ -33,9 +33,14 @@ angular.module('client').factory('guacClientFactory', ['$rootScope',
|
||||
* provided tunnel.
|
||||
*
|
||||
* @param {Guacamole.Tunnel} tunnel The tunnel to connect through.
|
||||
* @param {Scope} [$scope] The current scope. If ommitted, the root scope
|
||||
* will be used.
|
||||
* @returns {Guacamole.Client} A new Guacamole client instance.
|
||||
*/
|
||||
service.getInstance = function getClientInstance(tunnel) {
|
||||
service.getInstance = function getClientInstance(tunnel, $scope) {
|
||||
|
||||
// Use root scope if no other scope provided
|
||||
$scope = $scope || $rootScope;
|
||||
|
||||
// Instantiate client
|
||||
var guacClient = new Guacamole.Client(tunnel);
|
||||
|
||||
Reference in new issue
Block a user