Skip to main content

Posts

Showing posts from 2018

Angular2 Installing main plugins using angular cli steps?

Angular2 Installing main plugins using angular cli steps?
1)npm i -D @angular-devkit/core
2)npm install jquery --save (or) npm install bootstrap@3 jquery --save
3)npm install -D @types/jquery
4)npm install font-awesome --save
5) npm install moment --save
6)npm install --save angular2-daterangepicker (Not there from source download) -> http://www.daterangepicker.com/#config
7)https://www.npmjs.com/package/ng2-highcharts
 i)npm install --save highcharts@^4.2.1
 ii)npm install @types/highcharts --save
 iii)npm install --save ng2-highcharts
8)npm install ngx-pagination --save(https://github.com/michaelbromley/ngx-pagination)
9)npm install -D @types/bootstrap
10)npm install --save @types/daterangepicker

How to deploy angular2 with Apache server ?

How to deploy angular2 with Apache server  and angular cli?
ng build --prodIt will create dist folder in the applicationCopy the dist folder all files to /var/www/html/Create .htaccess file in the path of /var/www/html/Write this code   in .htaccess file<IfModule mod_rewrite.c>  RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f  RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule . /index.html [L]</IfModule>sudo service apache2 restart