So I'm trying to create an app that needs no webserver with AngularJS
I'm using <script type="text/ng-template" id="loginView.html" src="views/login.html"></script>
tags to use separate templates and keep things clean.
I wire the thing up in:
app.config(function($routeProvider, $locationProvider){
$locationProvider.hashPrefix("!");
$locationProvider.html5Mode(false);
$routeProvider
.when("/", {
templateUrl: "loginView.html",
controller: "LoginCtrl"
})
.when("/main", {
template: "main",
controller:"MainCtrl.html"
})
.otherwise({
redirectTo: "/"
});
});
My files are not loading. If I put context inside the script tag I can see it. I have an ng-view to contains the views. But I can't seem to get content from separate files. No errors are given. Is this possible without a webserver?