-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdialog1.js
More file actions
27 lines (27 loc) · 771 Bytes
/
Copy pathdialog1.js
File metadata and controls
27 lines (27 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
define('dialog1', [],function(){
var bindD1 = function() {
$('#oppnadialog1').click(function(){
var dialog1Element;
dialog1Element = '<div id="forstadialogen" title="Dialog Uno" ng-controller="d1Ctrl">';
dialog1Element += 'Första dialogens titel är: ';
dialog1Element += '<span ng-bind="title"></span>';
dialog1Element += '</div>';
$(dialog1Element).dialog({
create: function(){
angular.module('dialog1', [])
.controller('d1Ctrl', function($scope){
$scope.title = 'Första dialogen, wiii!';
});
angular.bootstrap('#forstadialogen',['dialog1'])
},
close: function() {
//$(dialog1Element).dialog('destroy');
$(this).dialog('destroy').remove();
}
});
});
};
return {
bindD1: bindD1
}
});