Is it possible to use ng-include without web server?

后端 未结 5 1464
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 04:10

I\'m running an AngularJS app which merely include a file

That works when run un

5条回答
  •  执念已碎
    2020-12-01 04:18

    Using virtual Host on your xampp is the best solution , and give custom name like yourProject.dev

    update httpd-vhosts file in C:\xampp\apache\conf\extra\httpd-vhosts

    
            ServerName  yourProject.dev
            ServerAlias www.yourProject.dev  yourProject.com www.yourProject.com
            DocumentRoot "C:\Users\customFolder/yourProject"
            
                DirectoryIndex index.html index.php
                ServerSignature Off
                Options Indexes FollowSymLinks IncludesNoExec
                AllowOverride All
                Allow from all
                Require all granted
          
    
    

    then update your hosts file to 127.0.0.1 yourProject.dev

    in Windows : c:\Windows\System32\Drivers\etc\hosts

    in Mac : /private/etc/hosts

    don't forget to rest your xampp/wampp

提交回复
热议问题