I need to open a dialog and pass it some options. The idea is to have a template popup that i can change the title and message depending on the thing calling it. So I have a better alert().
Docs have some code on passing it parent scope, but how do i pass my own object and retrieve it?
angular.module('myApp').controller('MyController', function($scope) {
ons.ready(function() {
ons.createDialog('dialog.html', {parentScope: $scope}).then(function(dialog) {
$scope.dialog = dialog;
});
});
// This variable will be available in the dialog scope as well.
$scope.myVariable = 'Hello!';
});
So basically how do i pass it a object and access it in my dialog's controller:
app.controller('generalSucessPopupController', function($scope){
});