Pleas find below module, controller and directive definition along with parent cshtml. All the js file are separated. Not able to figure out whats the issue as the code is not throwing any error. Any help would be appreciated.

        (function () {
            "use strict";
            angular.module("requestModule", ["kendo.directives"]);
        })();

        (function () {
            "use strict";
            angular.module("requestModule")
                .controller("requestController", ["$scope", requestController]);
            function requestController($scope) {
                console.log($scope);
                $scope.domainData = {};

                $scope.domainData.RequestTypes = [
                    { "Id": 1, "Name": "rt1" },
                    { "Id": 2, "Name": "rt2" }
                ];
                $scope.domainData.Channels = [
                    { "Id": 1, "Name": "channel1" },
                    { "Id": 2, "Name": "channel2" }
                ];
                $scope.domainData.Products = [
                    { "Id": 1, "Name": "pr1" },
                    { "Id": 2, "Name": "pr2" }
                ];
            }

        })();

    (function () {
        "use strict";
        angular.module("requestModule")
            .directive("requestDirective", function () {
                return {
                    restrict: "E",
                    templateUrl: '/requestDetails/requestTemplates/editRequestTemplate.html',
                    scope: {
                        domainData: "="
                    },                                controller: function ($scope) {
                        console.log($scope);
                    } //End of controller
                };
            });
    })();

@{
    ViewBag.Title = "EditRequest";
}
@section JavascriptInHead
{
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <script src="~/Scripts/angular.min.js"></script>
    <script src="~/Scripts/kendo.all.min.01.js"></script>

    <script src="~/Scripts/wfm/requestModule.js"></script>
    <script src="~/Scripts/wfm/requestController.js"></script>
    <script src="~/Scripts/app/directives/editRequestDirective.js"></script>

    <link href="~/Content/kendo.common.min.css" rel="stylesheet" />
    <link href="~/Content/kendo.default.min.css" rel="stylesheet" />
    <link href="~/Content/kendo.metro.min.css" rel="stylesheet" />
    <link href="~/Content/kendo.bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/kendo.common-bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/kendo.dataviz.bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/wfmRequest/wfmEditRequest.css" rel="stylesheet" />
}

<div ng-app="requestModule">
    <div ng-controller="requestController" class="container">
        <request-directive domain-data="domainData"></request-directive>
    </div>
</div>

Related posts

Recent Viewed