Hi,
I have noticed few things, You are using angularjs 1.2 & router lib 1.2
version. I am not sure if angular route is separated from angular lib after
1.2 or 1.3. I would update to latest 1.5.x at least. I tested with
following change to config router in script.js and it is working fine for
route state change.
.otherwise({
redirectTo: '/'
})
I see code to make call to WebSocket is invoked through service.connect()
when Connect Websocket is button is clicked. I would put within controller
app.controller('myCntrl',function($scope){
$scope.connect = function(){
websocket = new WebSocket("ws://echo.websocket.org/");
....
}
})
On Friday, 24 February 2017 09:10:32 UTC-5, hiBrian wrote:
>
>
> Hi,
> I am trying to implement routing for my first AngularJs application.
> My stand alone code which has no routing works as expected.
>
> http://plnkr.co/edit/JjMbEXgXYQ42A00Aw6gB
>
>
> However the code with ngroute doesn't work as expected. When I fill in the
> fields in the text box in traffic.html it doesn't take input + websocket
> connection doesn't open upon clicking the button.
>
> http://plnkr.co/edit/WiGz8dwO8yFjl2fk2lY7
>
>
> If someone could take a look at it and provide the insight that would be
> really great.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.