| author | rougeronj |
| Mon, 23 Mar 2015 17:07:36 +0100 | |
| changeset 31 | 8d016c195d79 |
| parent 26 | c7dfe7185ef7 |
| child 37 | 81ed4fbb1a64 |
| permissions | -rw-r--r-- |
| 0 | 1 |
(function(){ |
|
31
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
2 |
'use strict'; |
| 0 | 3 |
|
|
31
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
4 |
angular.module('ammicoSlides',['ngResource', 'ngRoute']) |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
5 |
.controller('slidesCtrl', function($scope, $routeParams, searchApi, $sce){ |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
6 |
|
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
7 |
$scope.slide = searchApi.slide.get({idSlide:$routeParams.idSlide, format:'json'}, function(data){ |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
8 |
data.details.description = $sce.trustAsHtml(data.details.description); |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
9 |
}); |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
10 |
|
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
11 |
console.log($routeParams.idSlide); |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
12 |
console.log($scope); |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
13 |
//$scope.slide = booksModel.slides[$routeParams.idSlide]; |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
14 |
}) |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
15 |
.controller('slideEditCtrl', function(){ |
|
8d016c195d79
get info of a slide and show it. Sanitize html from description field and add it to the scope
rougeronj
parents:
26
diff
changeset
|
16 |
}); |
| 0 | 17 |
|
18 |
})(); |