define(['app'], function (app) { 'use strict'; app.controller('MainCtrl', function ($scope, $illustration) { $scope.showIllustration = function(tab){ $scope.isShowLeftPanel = tab; switch (tab){ case 'illustration': { $scope.IllustrationList = $illustration.getAll(); $scope.illustrationSelectConfig = { allowClear:true } break; } // case: '' } } $scope.modalTShirtDesign = function() { // console.log($('#tshirt-design').length); $('#tshirt-design').modal( { backdrop: 'static', keyboard: false } ); $scope.showIllustration('default'); }; $scope.modalClose = function(){ $('#tshirt-design').modal('hide'); } }); });