How to access InAppBrowser cordova plugin in controller

I want to use the InAppBrowser defined in a controller, but I can’t access it in the $scope. I get an error: TypeError: Object #<Scope> has no method 'open' when calling inApp.open.

console.log(inApp) return ChildScope.

dashboard.controller('DashboardCtrl', ['Restangular', '$scope', '$cordovaInAppBrowser', function (Restangular, $scope, $cordovaInAppBrowser) {

	var inApp = $cordovaInAppBrowser.init({
		location: 'no',
		clearcache: 'yes'
	});

	inApp.$on('loadstop', function(event) {
		var url = event.url;
		console.log(url);
		var filename = url.substring(url.lastIndexOf('/')+1);
		console.log(filename);
		if(filename == "mobile.login.html"){
			inApp.close();
		}
	});

	console.log(inApp);

	$scope.googleLogin = function() {
		console.log(inApp);
		inApp
			.open('http://http://192.168.0.27:3000/auth/google', '_blank')
			.then(function(event) {
				// success
			})
			.catch(function(event) {
				// error
			});
	}

});

I made a mistake by calling open on inApp instead of $cordovaInAppBrowser.