on index.html page but t" /> on index.html page but t" /> on index.html page but t"/>

$locationProvider stops other scripts to load and displays nothing in console.log

66 Views Asked by At

I'm using $locationProvider as a dependency and used $locationProvider.html5Mode(true); on routes.js and used <base href='/"> on index.html page but that turns out to be an error like Error: $injector:modulerr Module Error and some weird stuff, so I have searched on it and removed the <base href='/"> and modified $locationProvider.html5Mode(true); to $locationProvider.html5Mode({enabled: true, requireBase: false}); , Now I don't face any errors but nothing is loaded like no views nor controllers or any, I'm using a lot of other cdn's. AnyOne please help me out...

Edited

If i need to share my code on plunker I have to edit all the files to point to correct location to access them as this app deals with directives, services and other stuff so giving below some code that gives u some view on what my problem was

Here's github repository link: https://github.com/avinashdv/GameOfThrones please edit the $locationProvider on routes.js with the below code and index.html with the <base href='/"> to see the error

Also trying the $locationProvider.html5Mode(true); on routes.js without <base href='/"> on index.js also results nothing...

routes.js

$locationProvider.html5Mode(true);

$routeProvider
.when('/', {
    templateUrl     : 'pages/main-view.html',
    controller      : 'firstController',
    controllerAs    : 'firstCtrl'
})

index.js

<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8">
<base href="/" >
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css?family=Bungee" 
rel="stylesheet">
0

There are 0 best solutions below