This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/ash | |
apk --update add git nano |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
It is always a better idea to pass the readable items as function parameters when defining functions | |
on the scope/this/vm. Although the change is very subtle but as the code base grows bigger, this helps | |
identifying whats being read and written when a function is handling multiple things. Also, when calling | |
the function from the view, putting in the parameters there an then keeps the code readable and identifiable. | |
e.g. | |
<ul> | |
<!-- Clearly identifiable that the user being passed in is being selected --> | |
<li ng-repeat="user in users" ng-click="vm.select(user)"></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (url) { | |
return api.attempt(url).then(insert) | |
.catch(function (error) { | |
return Q.reject(error); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('SampleApp',[]) | |
.controller('SampleAdminsCtrl', function ($scope, Admins, AdminsServ) { | |
//Admins is a route resolve | |
//$scope.Admins will hold whatever Admins object brings in itself | |
$scope.isAdminView = true; | |
$scope.Admins = Admins; | |
//onViewPortals is a ngClick handler which calls in a service function upon a condition |