Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Following angular code doesn't work. How can it be fixed?
**$scope.Load = false;**


div ng-controller="Soket_Control">
        <div  style="text-align: center; margin-top: 200px;">
            <img ng-show ="Load" src="../WDizayn_Angular_Tool/Images/Load.gif" />
        </div>
</div>

function Soket_Control($scope) {
    $scope.Load = true;
    var ws = new WebSocket('ws://localhost:8181/consoleappsample', 'my-protocol');
    ws.onmessage = function (evt) {
        alert("2");
    };
    ws.onopen = function () {
        **$scope.Load = false;**
    };
    ws.onclose = function () {
        alert("3");
    };

}
Posted
Updated 28-Aug-13 12:07pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900