I recently buy a template and it comes with Angular version so I'm trying
to work with this in my SF2.5 application. Right now I'm having a problem
and I can't find where it's failing since this isn't my code and I'm still
learning a bit on this. So the error is as title says "Error: $topmenu is
not defined". I find trough directives and I notice this one:
.directive('navigation', function() {
return {
restrict: 'AE',
controller: ['$scope', function($scope) {
}],
transclude: true,
replace: true,
link: function(scope, element, attrs) {
if (!$topmenu) {
if (!null) {
element.first().jarvismenu({
accordion: true,
speed: $.menu_speed,
closedSign: '<em class="fa
fa-plus-square-o"></em>',
openedSign: '<em class="fa
fa-minus-square-o"></em>'
});
} else {
alert("Error - menu anchor does not exist");
}
}
// SLIMSCROLL FOR NAV
if ($.fn.slimScroll) {
element.slimScroll({
height: '100%'
});
}
scope.getElement = function() {
return element;
}
},
template: '<nav><ul data-ng-transclude=""></ul></nav>'
};
})
It's the only place where $topmenu is used, where is the error? Where
should I define that var in order to avoid the error?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.