Skip to content

Instantly share code, notes, and snippets.

@emiralp
Last active August 29, 2015 14:06
Show Gist options
  • Save emiralp/1b80a5df375fa604f21e to your computer and use it in GitHub Desktop.
Save emiralp/1b80a5df375fa604f21e to your computer and use it in GitHub Desktop.
File parts of '/templates/m' route. 'megamenu.html' is the successful return of '/templates/m' route.
<div class="mega-container" ng-show="activeMegaMenu" ng-mouseleave="hideMegaMenu()" ng-mouseenter="lockMegaMenu()" ng-click="hideMegaMenu()">
<div class="megamenu-wrapper megamenu-animation" ng-show="activeMegaMenu == 1">
<div class="container">
<div class="row">
<div class="col-sm-3 mm-col mm-col-nohover mm-br">
<div class="mm-title">
<span translate="MJ_1">İDO ile</span>
<div translate="MJ_2">Yolculuk</div>
</div>
</div>
<div class="col-sm-3 mm-col mm-br" ng-repeat="section in sections.travel.child_sections">
<div class="mm-nav">
<div class="mm-nav-header">
<i class="icon-{{section.icon}}"></i>
</div>
<div class="mm-nav-title">{{section.title}}</div>
<div class="mm-nav-wrapper">
<ul class="lists mm-nav-list">
<li ng-repeat="page in section.pages" ng-if="page.is_visible"><a ng-href="/#!/{{section.parent_section_slug}}/{{section.slug}}/{{page.slug}}">{{page.title}}</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="megamenu-wrapper megamenu-animation" ng-show="activeMegaMenu == 2">
<div class="container">
<div class="row">
<div class="col-sm-3 mm-col mm-col-nohover mm-br">
<div class="mm-title">
<span>İDO</span>
{{'CORPORATE'|translate}}
</div>
</div>
<div class="col-sm-3 mm-col mm-br" ng-repeat="section in sections.corporate.child_sections">
<div class="mm-nav">
<div class="mm-nav-header">
<i class="icon-{{section.icon}}"></i>
</div>
<div class="mm-nav-title">{{section.title}}</div>
<div class="mm-nav-wrapper">
<ul class="lists mm-nav-list">
<li ng-repeat="page in section.pages" ng-if="page.is_visible"><a ng-href="/#!/{{section.parent_section_slug}}/{{section.slug}}/{{page.slug}}">{{page.title}}</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
app.directive('megaMenu', function() {
return {
restrict: 'E',
replace: true,
templateUrl: '/templates/m',
link: function(scope, ele, attrs) {
//console.log('inited success');
},
controller: function($scope, $rootScope) {
$scope.sections = {};
$rootScope.$watch('sections', function(){
$scope.sections = $rootScope.sections;
});
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment