Advertisement
Guest User

Untitled

a guest
Jan 6th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. .directive("viewSeats", ['$parse', function ($parse) {
  2. return {
  3. restrict: 'E',
  4. scope: {
  5. numItinerary: "@",
  6. numSegment: "@",
  7. seatMap: "@",
  8. allTravelers: "@",
  9. allData: "@",
  10. flightPnr: "@",
  11. flightNumber: "@",
  12. flightTerminal: "@"
  13. },
  14. templateUrl: baseEnginePath + "/Templates/FLight/flight-seats.html",
  15. controller: ["$scope", "$element", "$compile", function ($scope, $element, $compile) {
  16.  
  17. }],
  18. link: function ($scope, $elem, $attrs) {
  19.  
  20. $elem.bind("click", function () {
  21.  
  22. console.log("flightPnr", $scope.flightPnr);
  23.  
  24. jQuery.fancybox($('#modalSeats'), {
  25. 'width': '600',
  26. 'height': '800',
  27. 'autoSize': false
  28. });
  29. });
  30.  
  31. }
  32. };
  33. }]);
  34.  
  35. <div imaginemos que aqui es el ng-repeat y la directiva se genera x cantidad de veces>
  36. <view-seats all-data="@jsonDisplayRS" all-travelers="@jsonTravelers" seat-map="@seatsData" flight-pnr="@listSegments.Item(i + p).Item(17)" flight-number="@listSegments.Item(i + p).Item(8)" flight-terminal="@listSegments.Item(i + p).Item(6)" num-itinerary="@listSegments.Item(i + p).Item(18)" num-segment="@listSegments.Item(i + p).Item(16)"></view-seats>
  37. </div>
  38.  
  39. <ul>
  40. <li>
  41. PNR
  42. <strong>{{flightPnr}}</strong>
  43. </li>
  44. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement