index.html 4.86 KB
<html ng-app="myApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>无标题</title>
    <link href="../directive/style.css" rel="stylesheet">
    <link rel="stylesheet" href="http://xn-static.oss-cn-hangzhou.aliyuncs.com/css/xn-bootstrap/1.0.1/bootstrap.min.css">
    <link rel="stylesheet" href="../spm_modules/xn-style-common/2.0.2/xn-style-common.less">
    <link rel="stylesheet" href="../spm_modules/xn-icon-common/1.0.5/iconfont.css">
</head>
<body ng-controller="MyController">

{{xnForwarded}}

    <div class="" xn-forwarded  ng-model="xnForwarded" data-method="closeForwarded(data)">弹出框</div>

</body>

<script type="text/javascript">
    var xnConfig = {
        wwwUrl: "$config.getWwwUrl('')",
        erpUrl: "$config.getErpUrl('')",
        employeeUrl: "$config.getEmployeeUrl('')",
        authUrl: "$config.getAuthUrl('')",
        serviceUrl: "$config.getServiceUrl('')",
        memberUrl: "$config.getMemberUrl('')",
        openUrl: "$config.getOpenUrl('')",
        customerUrl: "$config.getCustomerUrl('')",
        supplierUrl: "$config.getSupplierUrl('')",
        myUrl: "$config.getMyUrl('')",
        siteUrl: "$config.getSitewebUrl('')"
    };
</script>

<script type="text/javascript" src="../spm_modules/jquery/1.7.2/jquery.js"></script>
<script type="text/javascript" src="../spm_modules/xn-angular/1.0.0/angular.js"></script>
<script type="text/javascript" src="../spm_modules/angular-ui/1.2.0/bootstraptpls.js"></script>
<script type="text/javascript" src="../directive/selects.js"></script>
<script type="text/javascript">

        angular.module("myApp", ["xn.directive.select"])
        .value("xnConfig",xnConfig)
        .controller("MyController", ["$scope","$timeout","$sce", function($scope,$timeout,$sce){

            $scope.description= $sce.trustAsHtml("hello,<br><br><b>今天我们去哪里?</b>" );

            $timeout(function () {
                $scope.sourceList = [];
                $scope.sourceList.push({name:"你好", id:1});
                $scope.sourceList.push({name:"是谁", id:2});
                $scope.sourceList.push({name:"你是信", id:3});
                $scope.sourceList.push({name:"王响", id:4, parentId:3});
                $scope.sourceList.push({name:"王响1", id:5, parentId:4});
                $scope.sourceList.push({name:"王响2", id:6, parentId:4});
                $scope.sourceList.push({name:"王响3", id:7, parentId:3});
                $scope.sourceList.push({name:"王响4", id:8, parentId:1});

            },1000);
            $timeout(function () {
                $scope.result1 = [];
                $scope.result1.push({name:"是谁", id:2});
                $scope.result1.push({name:"王响1", id:5, parentId:4});
                $scope.result1.push({name:"王响2", id:6, parentId:4});
                $scope.result1.push({name:"王响3", id:7, parentId:3});
            },2000);



            $scope.init = function() {
                $scope.users = [];
                $scope.users.push({name:"Tom", id:"0"});
                $scope.users.push({name:"01Jason", id:"1", pId: "0"});
                $scope.users.push({name:"02Kitty", id:"2", pId: "0"});
                $scope.users.push({name:"011Jack", id:"3", pId: "1"});
                $scope.users.push({name:"021Jack", id:"4", pId: "2"});
                $scope.users.push({name:"022Jack", id:"5", pId: "2"});
                $scope.users.push({name:"03Jack", id:"6", pId: "1"});
                $scope.persons = [];
                $scope.persons.push({name:"Tom", id:"0"});
            };
            $scope.init();

            $timeout(function(){
                $scope.result=[
                    {name:"Tom", id:"0"},
                    {name:"01Jason", id:"1", pId: "0"},
                    {name:"02Kitty", id:"2", pId: "0"},
                    {name:"011Jack", id:"3", pId: "1"}
                ];
            },1000);




            $scope.option = [0, 60, 5];

            $scope.show = function() {
                $scope.result1 = [];
                alert($scope.dd);
            };

            $scope.options = {
                pageSize: 10,
                pageNumber:1,
                totalCount: 15,
                methodName: "getInventoryList"
            };
             $scope.parameter={name:"zhaoxing"};
            $scope.getInventoryList=function(){


            };
            //选择框
            $scope.sourceInputList=[
                 {"key":"niHao",value:"你好"},
                 {"key":"niHuai",value:"你坏"},
                 {"key":"niSha",value:"你傻"},
                 {"key":"niDai",value:"你呆"}
            ];
             $scope.inputData={};


            $scope.xnForwarded;
            
            $scope.closeForwarded=function (data){
                console.log(1111111111111111111111);
                console.log(data);
            }
            
        }]);

</script>
</html>