Is it possible to use ionic frameowork for regular Web Applications rather than wrapping it in Cordova?
This is possible if you include the components of www/lib/ - This folder contains the core of ionic(the ionic framework + angularjs) and you can proceed from there.
However it's important to note that ionic was built on top of angularjs, specifically with mobile in mind. To get better results for web app development, you should consider using core angularjs(for functionality) and bootstrap3 (for UI).
While I don't believe there is much support for anything but hybrid web apps in Ionic, you can check out Mobile Angular UI for a very similar alternative with support for the mobile web.
Orane is right.
When You "node app.js" your app runs a server. We need to provide this server with all files we want. With Ionic Application it's basically www folder. In following example i put all contents of www folder to my public folder.
My root folder has app.js file and public folder. That's how app.js looks like:
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 public folder i have all frontend css and js. We included the whole folder public in code above. Now in index.html of public You should include files with public/, like this:
<script src="public/lalala.js"></script>
All the best, anybody, feel free to ask anything about Node.js+Ionic Framework
You know I'd like to know more about this too..
I was thinking about this as I noticed with Visual Studio 2015 preview that you have the option to develop 'Universal Apps', and at first I was like, whats this? And then discovered that it allow you to create an app with a common base, and then splits out the projects for front end for Win Phone and Win 8.1 UI. I was thinking this is not a bad idea.
It kinda makes you wonder if the same could be done with Ionic and webapps. It would be cool to be able to fire up an Ionic project called 'Ionic Universal' for instance, and this provides 2 sub folders that contain the UI for normal web app (for PCs etc) and then UI for phone as per current default. Of course you can do this yourself manually, but still I think it would be nice. And then for the backend it could be a common base, that detects what UI is being used and you can make adjustments on that UI, for instance throtteling, inclusion of Push, SMS etc for Phone layer being used etc.
I'm looking at trying the above out myself. I'm going to try using Azure Mobile Services for my backend service, and I want to see how it goes being used to service my normal web application. I cant see any issues really. I mean its still an API at the end of the day.
I'm a total noob to web dev altogether so some of the things I'm saying here may seem dum but Im just putting it out there, that noobs of course like 'paths of least resistence' and simplicity in knowing, I can run up a project for a customer, they get both a web app (desktop) and mobile app (runs on any device), the backend is the same. Jobs done. May seem overly simple, but thats what I like.
Cheers