Javascript 无法读取属性';通知SHUB&x27;未定义的?带角信号器

Javascript 无法读取属性';通知SHUB&x27;未定义的?带角信号器,javascript,c#,angularjs,Javascript,C#,Angularjs,//角度控制器 C#代码(轮毂类) public void Send() { IHubContext context=GlobalHost.ConnectionManager.GetHubContext(); context.Clients.All.SendNotification(); } 我尝试在owin启动类中添加map,所有脚本都放在正确的位置,我尝试了很多解决方案,但都不起作用。我需要帮助:D我发现一个解决方案说要从global.cs文件中注释或删除bundle register,并

//角度控制器

C#代码(轮毂类)

public void Send()
{
IHubContext context=GlobalHost.ConnectionManager.GetHubContext();
context.Clients.All.SendNotification();
}

我尝试在owin启动类中添加map,所有脚本都放在正确的位置,我尝试了很多解决方案,但都不起作用。我需要帮助:D

我发现一个解决方案说要从global.cs文件中注释或删除bundle register,并且signar文件似乎与中的其他.js文件有冲突bundleconfig.cs文件及其解决方法

$scope.notification = $.connection.notificationsHub;

$scope.SendNotification = function (schoolId) {
    $http({
        url: "/Notifications/InsertNotification?SchoolId=" + schoolId+"&Notification="+$scope.Notification,
        method: "GET"
    }).then(function (res) {
        console.log(res);


    notification.client.sendNotification = function () {
        getAllNotifications();
    }
    $.connection.hub.start().done(function () {
        getAllNotifications();
    }).fail(function (e) {
        console.log(e);
        alert(e);
    })

    function getAllNotifications() {
        $http({
            url: "/Notifications/Notifications?SchoolId=" + schoolId,
            method: "GET"
        }).then(function (res) {
            console.log(res);

        });
    }
    });
}
public void Send()
{
    IHubContext context = GlobalHost.ConnectionManager.GetHubContext<NotificationsHub>();
        context.Clients.All.SendNotification();
}