Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


not getting js css filelinks while reloading the page using angular js and htac


not getting js css filelinks while reloading the page using angular js and htac  using -'javascript,angularjs,.htaccess'

I am getting some link failure error while reloading the page using Angular.js and .htaccess. Actually i was trying to remove hash tag in angular.js. I set .htaccess file and set the base href . I am explaining my code below.


  .htaccess:


<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /Gofasto/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !.*\.(css|js|html|png|jpg|jpeg|gif|txt)
    RewriteRule (.*) index.html [L]
</IfModule>



  loginRoute.js:


var Admin=angular.module('Channabasavashwara',['ui.router']);
Admin.config(function($stateProvider, $urlRouterProvider,$locationProvider) {
    $urlRouterProvider.otherwise('/');
    $stateProvider
     .state('/', {
            url: '/',
            templateUrl: 'dashboardview/login.html',
            controller: 'loginController'
        })
        .state('dashboard', {
            url: '/dashboard',
            templateUrl: 'dashboardview/dashboard.html',
            controller: 'dashboardController'
        })
        .state('dashboard.profile', {
        url: '/profile',
        templateUrl: 'dashboardview/profile.html',
        controller: 'profileController'
    })
    .state('dashboard.dept', {
        url: '/dept',
        templateUrl: 'dashboardview/dept.html',
        controller: 'deptController'
    })
    .state('dashboard.princpal', {
        url: '/princpal',
        templateUrl: 'dashboardview/princpal.html',
        controller: 'princpalController'
    })
    .state('dashboard.dept_head', {
        url: '/dept_head',
        templateUrl: 'dashboardview/depthead.html',
        controller: 'deptheadController'
    })
    $locationProvider.html5Mode({
      enabled: true,
      requireBase: true
    });

})


when i am in dashboard page its working fine.but when i am in profile page 1st time its working fine and when i am reloading this page again i am getting the following error.

failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/profileController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/deptController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/controller/deptheadController.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/js/newbill.js Failed to load resource: the server responded with a status of 404 (Not Found)
profile:118 Uncaught TypeError: $(...).chosen is not a function
http://localhost/Gofasto/dashboard/css/bootstrap.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/style22.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/plugins.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/pace.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/css/style.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/Gofasto/dashboard/icons/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)


All my css and js folders are present inside Gofasto folder but it is showing the wrong link where 1st time it is coming properly.I also set <base href="/Gofasto/">in the index page.Please help me to resolve this error.
    

asked Oct 11, 2015 by dhananjayksharma
0 votes
3 views



Related Hot Questions



Government Jobs Opening


...