Orane is right.
When you are "node app.js" , your application starts the server. We must provide this server with all the files we want. The Ionic Application has the www folder. In the following example, I put the entire contents of the www folder in my public folder.
In my root folder there is an app.js file and public . This looks like app.js :
var express = require('express'); var app = express(); var server = require('http').createServer(app); app.get('/', function (request, response) { response.sendFile(__dirname + "/public/index.html"); }); app.use(express.static(__dirname, 'public'));
In the public folder, I have all the css and js interfaces. We have included the entire public folder in the code above. Now in index.html public . You must include files with public / , for example:
<script src="public/lalala.js"></script>
Anyone, feel free to ask questions about Node.js + Ionic Framework
markkillah Jan 07 '15 at 14:25 2015-01-07 14:25
source share