How to watch route change in angularjs

    To watch route change in angularjs you can do this by watching on $routeChangeStart, $routeChangeSuccess, $routeChangeError
    $scope.$on('$routeChangeStart', function(next, current) {
    //Where next, current are respective routes
    //You can write here whatever you want to do

    How to prevent angular route change conditionally

    You can simple do this by watching $locationChangeStart
    $scope.$on('$locationChangeStart', function(ev) {
        if (<Some Condition Here >) {

    How to make a value selected by default using angularjs ng-options in select box

    You can build your controller like below TestController
    var TestController = function($scope) {

        $scope.person = 1;

        $scope.persons =
            { id: 1, name: "Mohit" },
            { id: 2, name: "Rajeev" },
            { id: 3, name: "Yashwant" },
            { id: 4, name: "Hamender" }
    Below is the how we can render the select in view. Mohit is selected by default there
    <select data-ng-model="person"
            data-ng-options=" as for t in persons">              
    Note: 1.