Angularjs 2 installation Methods - angularjs

I have one angularjs 2 UI (without node modules) which i have to integrate with my backend. After installing Angular cli, Can i simply do npm install in the angularjs 2 directory folder as it have package.json or create a new app after installing angular cli and then do npm install for some node modules specific to my angularjs project.
Will the first approach Work successfully as it is easier

If your backendend and frontend repos are in same package.json just serve your app. You can separate these ( in the future it will be more effective ) . So just search your starting command and run the app.

Related

How to upload and run Angular applications on Firebase?

Firebase Hosting doesn't support Node.js but to install Angular, one has to use npm
npm install -g #angular/cli
Without npm, angular can't install and without Node.js, Angular app can't run. But because Firebase Hosting doesn't support Node.js, we can't upload Angular apps? This also means we can't run npm packages like lodash, underscore etc..
Now there's also AngularFire 2 which is installed using npm!
npm install firebase angularfire2 --save
So to use Angular with Firebase, I've to use npm but the apps created using Angular + Firebase cannot be uploaded on Firebase Hosting because it doesn't supports npm!
Is there any workaround to host Angular apps on Firebase?
Firebase hosting is designated for delivery of static files, i.e. it does not "support Node.js" in the sence that you cannot implement custom server-side code (on Firebase Hosting at least - see Firebase Cloud Functions for this).
Of course you can fully develop your app with NPM as long as its just a full client web-app. You then upload your build result (i.e. compiled JavaScript / TypeScript + HTML + Assets + ...) to Firebase Hosting.
You just cannot run server side code with Firebase Hosting.

Where can I find systemjs.config in Ionic 2 Project?

I create an pure Ionic 2 project with the command.
ionic start myIonic --v2
The pure project work great, but when I compared the project structure with angularJS 2, I found the "systemjs.config.js" is missing.
My question is could "systemjs.config.js" file be replaceable?
If the answer is positive, what is the alternative file in Ionic2 based project ?
i have created a angularjs 2 based poject using angular2-cli using below command.
ng new PROJECT_NAME
when i create the project using angular2 cli, then also its not creating systemjs.config.js file.
link for angular2 cli new app .
And Systemjs.config.js file is creating in angular2 project only if i create quick start application, that too we are only creating manually. as given in official quick start document.
link for angular2 quick start app.
So using this 2 examples we can believe that systemjs.config.js file can be replaceable.
The angular-cli and ionic moved the build system from SystemJS to Webpack.
For angular
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli#latest
Full angular-cli migrate docs: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14

Angular2 with maven project

I have a question, I want to use angular 2 in maven project, and as you now the modules should download with ( npm install or ng new .. (cli) ).
The problem is if I generate the war file with all this modules, it will be very large because of the presence of all the nodejs modules.
In one of Github example they install this modules with ( npm install ) and finally goes to the home directory and run spring-boot:run
I want directly deploy my war file, so my question is : i should generate the war file with the all the modules and dependencies of nodejs or there is another solution ?
Three ways:
add all node_modules dependencies in to your version control, so source is always there, or copy necessary js libraries manually in specific source folder, like angular.min.js and so on (if your node.js is not available on your server, by security reason)
create execution goal inside pom.xml, something like
How to deploy a node.js app with maven?
use https://github.com/eirslett/frontend-maven-plugin and check existing examples, I am sure your case is straight forward

Bower Install With Front End Template

Hello i purchased a template this afternoon, previously what i used to do whenever i bought a template was to copy the js,image,font and css folders into my project and start using but this particular template i bought was very confusing for me.
I ended up having to install npm and use bower install to download the various packages, however this is my first time using bower install so i'm a bit confused as to what to do next. "bower install" created a new folder inside my template folder called "bower_components".
I would like to know what i need to do next to be able to use this template to develop my app, below is a screenshot of my theme's folder structure:
I am building my app using Laravel 5 on the backend and AngularJS on the front-end.

How do I setup an angularjs app on karma and nodejs

I would like to have a workflow for an angularjs app that uses mocha,chai instead of jasmine
I'm fine with setting up the bare project
npm init
npm install karma-mocha etc..
Is there a node way to install angularjs with a bare bones web project structure ? I'm not sold on yeoman yet...and looking for a leaner system
Thanks

Resources