javascript - AngularJS route syntax error illegal character -


i trying add new page website ( developed else ) , when add block route error like:

error: [$injector:modulerr] failed instantiate module nameapp due to: [$injector:nomod] module 'nameapp' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies second argument. http://errors.angularjs.org/1.3.12/$injector/nomod?p0=nameapp

my routing config:

 .config(         function($routeprovider, $locationprovider)         {             $routeprovider                 .when('/home', {                 templateurl: 'templates/home.html',                 title: 'home',                 controller: 'homecontroller',                 reloadonsearch: false             })             .when('/about', {                 templateurl: 'templates/about.html',                 reloadonsearch: false              })              .otherwise({ redirectto: '/404' });             $locationprovider.html5mode(true);         }     ) 

i not have problems configuration loads ok in web browser, when i'm trying add:

.when('/donate', {     templateurl: 'templates/donate.html',     reloadonsearch: false     }) 

i receive above error. ( have created donate.html file )

index.html

<li>     <a ng-class="getclass('/')" title="home" href="/">home</a> </li> <li>     <a ng-class="getclass('/about')" title="about us" href="/about">about us</a> </li> <li>     <a ng-class="getclass('/donate')" title="donate" href="/donate">donate</a> </li> 

any happening , how rid of error ? mention, when receive error, webpage looks mess.

i've got done. has nothing angular nginx. let's go deeper , tell happened:

i using flow in order have projects done: ubuntu 12.04, nginx, php-fpm

nginx has sendfile directive, defaults on. allows nginx use linux kernel’s sendfile() operation read requested file disk. typically quicker using read() , write(). far, good.

the problem sendfile doesn’t work in virtual environments. fix turned out insanely simple – turn sendfile off. it’s development machine, performance hit incurred turning off feature pretty negligible. (it want pretty significant performance hit outweigh file truncation!) in nginx config http server block, added:

sendfile off;

once nginx restarted, getting served full static files, , world again!


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -