Below is the code that Im is encountering:
//Main Codes for the Diary App (function () { //Create a new diary app var diary = angular.module('diary', ['ngRoute']); //Define a Router for the App diary.config(function ($routeProvider) { $routeProvider. when('/', { templateUrl: 'partials/wall.php', controller: 'DiaryWallController' }). when('/images', { templateUrl: 'partials/images.html', controller: 'DiaryImagesController' }). when('/audio', { templateUrl: 'partials/audio.html', controller: 'DiaryAudioController' }). otherwise({ redirectTo: '/' }); }); //Define Controllers diary.controller('DiaryWallController', function($scope) { $scope.message = "Lets do this!! Wall of this site"; }); diary.controller('DiaryImagesController', function($scope) { $scope.message = "Lets do this!! Images of this site"; }); diary.controller('DiaryAudioController', function($scope) { $scope.message = "Lets do this!! Audio of this site"; });})();
I get this Unknown TypeError: Can't read property '1' NuLL. It successfully extracts the files specified in the route, but it does not appear on the site. I checked the console:
XHR finished loading: GET "http://localhost/mobile%20diary/app/partials/images.html".
But the content of the loaded page does not appear on the site. I check the resources and the images.html file is uploaded there, and I see a file view, but it does not appear on the site.
Below is the HTML Shell file:
<!DOCTYPE html> <html ng-app="diary"> <head lang="en" ng-controller=""> <meta charset="UTF-8"> <link rel="stylesheet" href="css/bootstrap.css" type="text/css"> <link rel="stylesheet" href="css/style.css" type="text/css"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title></title> </head> <body> <header> <nav class="menu-nav"> <ul> <li class="menu-buttons"><a href="#" id="selected"><i class="fa fa-newspaper-o"></i></a></li> <li class="menu-buttons"><a href="#images"><i class="fa fa-file-text-o"></i></a></li> <li class="menu-buttons"><a href="#audio"><i class="fa fa-image"></i></a></li> <li class="menu-buttons"><a href=""><i class="fa fa-microphone"></i></a></li> <li class="menu-buttons"><a href="" id="selected"><i class="fa fa-navicon"></i></a></li> </ul> </nav> </header> <div ng-view> </div> <script src="js/angular.js"></script> <script src="js/angular-route.min.js"></script> <script src="js/app.js"></script> </body> </html>
source share