angularjs - Render angular ui calendar from other controller using ng-click -


i using angularjs calendar ui creating events scheduler calendar. calendar hidden , on switch toggle displayed. calendar not rendered until next or prev month button pressed.

app.controller('togglecontroller', [ '$scope', function($scope) {   $scope.toggleselection = function toggleselection(event) {       angular.element(document.queryselectorall('.calendar-container')).css({display:'block'});   }; }]); 

so want call render function calendar ui controller rendered on toggling view above controller

app.controller('calendarctrl', ['$scope','$rootscope', function($scope,  $compile, $timeout, uicalendarconfig) {     /* change view */     $scope.rendercalendar = function(calendar) {       $timeout(function() {         if(uicalendarconfig.calendars[calendar]){           uicalendarconfig.calendars[calendar].fullcalendar('render');         }       });     }; }]); 

i tried calling rendercalendar function using $rootscope below error

$timeout not defined or uicalendarconfig not defined etc

dependency declaration , injection has same , in-order.

do :

app.controller('calendarctrl', ['$scope','$compile', '$timeout', 'uicalendarconfig`, function($scope,  $compile, $timeout, uicalendarconfig) {\\ 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -