Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .directive("viewSeats", ['$parse', function ($parse) {
- return {
- restrict: 'E',
- scope: {
- numItinerary: "@",
- numSegment: "@",
- seatMap: "@",
- allTravelers: "@",
- allData: "@",
- flightPnr: "@",
- flightNumber: "@",
- flightTerminal: "@"
- },
- templateUrl: baseEnginePath + "/Templates/FLight/flight-seats.html",
- controller: ["$scope", "$element", "$compile", function ($scope, $element, $compile) {
- }],
- link: function ($scope, $elem, $attrs) {
- $elem.bind("click", function () {
- console.log("flightPnr", $scope.flightPnr);
- jQuery.fancybox($('#modalSeats'), {
- 'width': '600',
- 'height': '800',
- 'autoSize': false
- });
- });
- }
- };
- }]);
- <div imaginemos que aqui es el ng-repeat y la directiva se genera x cantidad de veces>
- <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>
- </div>
- <ul>
- <li>
- PNR
- <strong>{{flightPnr}}</strong>
- </li>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement