Posts

Showing posts from October, 2018

How to use angular application inside salesforce lightning component using lightning container

salesforce lightning, Steps. 1. Develop your lighting app 2. ng build to create dist folder use ng build --prod --env=prod if you want a minified js file 3. now copy the contents of dist folder into a zip 4. Upload zip file as static resource and name it for example as angularapp 5. Inside your component add the following markup ,wherever you want to place the app.            <lightning:container aura:id="AngularApp"     src="{!$Resource.angularapp1 + '/index.html'}"       /> 6/ embed the component in an lighting app the test out the UI How to deploy or host angular app in Github pages as a website

How to deploy or host angular app in Github pages as a website

How to deploy or host  angular app in Github pages as a website 1. Create a account in Github 2. Create a repository - get your url ready from the github 3. Go to your project directory in angular js where you run your app locally using ng serve 4. Open package.json file from ide 5. Add the following to the first section of the file "name": "your angular app name", - this will be already there "baseHref": "/your repository folder name",     like this /examplerep   "version": "0.0.0",   "license": "MIT", 6. Come back to project folder 7. install gh pages for github : npm install gh-pages --save-dev 8.makesure that you have cloned the github repository to desktop locally,you can do this from gihub.com also(open in desktop). 9.now back in the project folder run this command to build your project ng build --prod --base--href "your repository folder name" https://yourlogin name.github.io/repostory