Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- 'use strict';
- angular
- .module('blabla')
- .directive('showActiveTask', showActiveTask);
- showActiveTask.$inject = ['$uibModal'];
- function showActiveTask($uibModal) {
- return {
- //replace: true,
- restrict: 'E',
- scope: {
- taskData: '='
- },
- template: '<button type="submit"' +
- ' class="btn grey lighten-1 btn-raised white-text btn-sm"' +
- ' ng-click="open()">' +
- ' <span class="hidden-xs hidden-sm">View assigned tasks</span>' +
- '</button>',
- link: linkFunc
- };
- function linkFunc(scope, element, attrs) {
- var vm = this;
- vm.showLabel = false;
- console.log(scope);
- scope.open = function () {
- vm.modalInstance = $uibModal.open({
- templateUrl: 'blabla.html',
- size: 'lg',
- controller: scope.taskData,
- backdrop: true,
- resolve: {
- console.log('babla')
- }
- }
- }).result.then(function () {
- console.log("wanna switch");
- });
- console.log(scope)
- };
- scope.clear = function () {
- console.log('close modal');
- vm.modalInstance.close();
- };
- }
- }
- })();
Add Comment
Please, Sign In to add comment