Removing Hashbang from URL in AngularJs Route
<p>I am new in angularJs. I just tried to route pages in angularJs. It's working but '#' symbol is shown. So I have used </p>

<pre><code>$locationProvider and $locationProvider.html5Mode(true);
</code></pre>

<p>but it's not working. So I am giving my code bellow to seek for a help to find the problem. I am using CDN of angularJs.</p>

<p>The project Structure is:</p>

<p><a href="https://i.stack.imgur.com/EWohw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EWohw.png" alt="enter image description here"></a></p>

<p>app.Js File is</p>

<pre><code>'use strict';

angular.module('myApp', ['myApp.controllers', 'ngRoute']);

angular.module('myApp').config(function ($routeProvider, $locationProvider) {
    $routeProvider
        .when('/view1', {
            controller: 'Controller1',
            templateUrl: 'partials/view1.html'
        })
        .when('/view2', {
            controller: 'Controller2',
            templateUrl: 'partials/view2.html'
        });

    $locationProvider.html5Mode(true); //activate HTML5 Mode
});
</code></pre>

<p><strong>Controller is:</strong></p>

<pre><code>'use strict';

angular.module('myApp.controllers', [])
    .controller('Controller1', function ($scope) {
        $scope.message = "Hello, world";
    })
    .controller('Controller2', function ($scope) {
        $scope.now = new Date();
    });
</code></pre>

<p><strong>Html Page is:</strong></p>

<pre><code>&lt;!doctype html&gt;
&lt;html lang="en" ng-app="myApp"&gt;
&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;AngularJS Routing&lt;/title&gt;
    &lt;link rel="stylesheet" href="app.css"/&gt;
    &lt;base href="/"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;ul class="menu"&gt;
    &lt;li&gt;&lt;a href="/view1"&gt;view1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/view2"&gt;view2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ng-view&gt;&lt;/ng-view&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"&gt;&lt;/script&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-route.js"&gt;&lt;/script&gt;    
&lt;script src="app.js"&gt;&lt;/script&gt;
&lt;script src="controllers.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>