OSDN Git Service

a80516a439f5bc8e4bd5a8f09cd4c8bb3939b104
[eos/base.git] / zephyr / client / app / directive / my-number / my-number.directive.js
1 'use strict';
2
3 angular.module('zephyrApp')
4 .directive('myNumber', function () {
5     return {
6         templateUrl: 'app/directive/my-number/my-number.html',
7     scope: { }, // This Directive has has Isolated Scope
8     restrict: 'EA',
9     link: angular.noop,
10     controller: function($scope){
11                     // Receive "arg" and "opt" From $parent Scope 
12                     // $parent Scope is my-form Directive
13                     var arg = $scope.$parent.arg;
14                     var opt = $scope.$parent.$parent.opt;
15
16                     $scope.argName    = arg.argName;
17                     $scope.optionName = opt.optionName;
18                 }
19     };
20 });