Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3916a48

Browse files
Single
1 parent 642856a commit 3916a48

File tree

4 files changed

+22
-27
lines changed

4 files changed

+22
-27
lines changed
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
app.controller('dashboardCtr', function($scope,$mdDialog) {
12

3+
console.log("dashboard");
24

5+
$scope.showAdvanced = function(ev,presentData) {
6+
console.log(presentData);
7+
$mdDialog.show({
8+
templateUrl: 'templates/popup.html',
9+
parent: angular.element(document.body),
10+
targetEvent: ev,
11+
clickOutsideToClose:true
12+
})}
313

4-
app.controller('dashboardCtr', function($scope,$mdDialog) {
5-
$scope.imagePath = 'assets/images/galaxy-s5-large.jpg';
14+
$scope.cancel = function() {
15+
$mdDialog.cancel();
16+
}
617

7-
//console.log("Rakesh");
18+
function dialogCtr($scope, $mdDialog, info) {
19+
// Assigned from construction <code>locals</code> options...
20+
$scope.info = info;
21+
}
822

923
});

‎Web/SinglePageAngularJS/controller/homeController.js‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,6 @@ app.controller('homeCtr', function($scope, $mdSidenav, readJsonData, $state, $md
2727

2828
$state.go('home.dashboard');
2929

30-
$scope.showAdvanced = function(ev) {
31-
$mdDialog.show({
32-
//controller: 'dialogCtr',
33-
//locals : {info : data},
34-
templateUrl: 'templates/popup.html',
35-
parent: angular.element(document.body),
36-
targetEvent: ev,
37-
clickOutsideToClose:true
38-
})}
39-
40-
$scope.cancel = function() {
41-
$mdDialog.cancel();
42-
}
43-
44-
function dialogCtr($scope, $mdDialog, info) {
45-
// Assigned from construction <code>locals</code> options...
46-
$scope.info = info;
47-
}
4830

4931
});
5032
// var e = document.getElementById(id);

‎Web/SinglePageAngularJS/templates/dashboard.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div layout="row" layout-wrap >
2-
<md-card ng-repeat="file in data" ng-controller="dashboardCtr" class="card" flex-gt-sm="30" >
2+
<md-card ng-repeat="file in data" aria-label="" class="card" flex-gt-sm="30" ng-controller="dashboardCtr">
33
<md-card-title>
44
<md-card-title-text>
55
<p>{{file.name}}</p>
@@ -12,7 +12,7 @@
1212
</md-card-content>
1313
<md-card-actions layout="row" layout-align="end center">
1414
<p>${{file.price}}</p>
15-
<md-button ng-click="showAdvanced($event)">Buy</md-button>
15+
<md-button ng-click="showAdvanced($event,file)">Buy</md-button>
1616
</md-card-actions>
1717
</md-card>
1818

‎Web/SinglePageAngularJS/templates/popup.html‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<md-dialog ng-controller="homeCtr">
1+
<md-dialog aria-label="Shubham" ng-controller="dashboardCtr">
22
<form>
33
<md-toolbar>
44
<div class="md-toolbar-tools">
@@ -12,9 +12,8 @@ <h2>Phones</h2>
1212

1313
<md-dialog-content>
1414
<div class="md-dialog-content">
15-
16-
<img src="assets/images/galaxy-s5-large.jpg">
17-
15+
{{presentData.image.large}}
16+
<!-- <img src="assets/images/galaxy-s5-large.jpg"> -->
1817
</div>
1918
</md-dialog-content>
2019

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /