As described by David Walsh: http://davidwalsh.name/function-attempt
function attempt(fn, args, binding) {
try {
return fn.apply(binding, args);
} catch(e) {
console.log('Exception, fix me please', e);
}
var table = angular.element(document.createElement('pc-table')); | |
var tableElement = $compile(table)($scope); | |
angular.element(elem.parent()).append(table); |
As described by David Walsh: http://davidwalsh.name/function-attempt
function attempt(fn, args, binding) {
try {
return fn.apply(binding, args);
} catch(e) {
console.log('Exception, fix me please', e);
}
###Restore an Ionic App to state left by other developer
This will restore any platforms and cordova plugins listed in the package.json file under cordovePlugins and cordovaPlatforms. These are platforms and plugins added via ionic platform add
and ionic plugin add
rather than via npm (which live in platforms and plugins in the package.json file).
ionic state restore
###Change the network address for live preview
Sometimes you need to switch which network address live preview is going to listen to on ionic run --device -l
or ionic serve --lab
calls, this can be done by:
####Alias for a formatted changelog###
git config --global alias.changes '!git log --oneline --decorate > changelog.txt'
To export a changelog text file to the current directory named changelog.txt run:
git changes
####Alias for a formatted changelog with branch trees###
Add this line to ~/.profile
export PATH=$HOME/bin:$PATH
Create /etc/init.d/dropbox
Add the contents of the file below
Make the script executable and add it to the system startup
sudo chmod +x /etc/init.d/dropbox
##Angular CLI (ng serve)
To run the standard angular-cli ng serve
on a Cloud9 box, you need to specify the cloud9 specific ports the preview runs off as well as define a live preview port. So instead of the angular-cli command of ng serve
, run the following:
ng serve --host 0.0.0.0 --port 8080 --live-reload-port 8081
The port configuration is the important part to make sure it is accessible to preview. Once running, preview the App as per usual in Cloud9 via the "Preview" button (no need to use the "Run" button).
To make things easier, you can assign that command to an alias: