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
| $ctrl.reload = function() { | |
| return $state.transitionTo($state.current, $stateParams, { | |
| reload: true | |
| }).then(function() { | |
| $ctrl.hideContent = true; | |
| return $timeout(function() { | |
| return $ctrl.hideContent = false; | |
| }, 1); | |
| }); | |
| }; |
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
| /* Print styles */ | |
| body { | |
| width:100% !important; | |
| margin:0 !important; | |
| padding:0 !important; | |
| line-height: 1.45; | |
| font-family: Garamond,"Times New Roman", serif; | |
| color: #000; | |
| background: none; |
function _buildHash(value) {
var hash = 0, i, currChr;
if (value.length === 0) { return hash; }
for (i = 0; i < value.length; i++) {
currChr = value.charCodeAt(i);
hash = ((hash << 5) - hash) + currChr; // jshint ignore:line
hash |= 0; // jshint ignore:line
}
return hash.toString(2);
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
| // from a component controller | |
| toDataURL( | |
| image_url | |
| ).then( | |
| function onsuccess(response) { | |
| ctrl.ngModel.$setViewValue(ctrl.previousImage); | |
| }, | |
| function onError(response) { | |
| $log.error(response); | |
| } |
When defining dependencies some prefixes are used.
"dependencies": {
"a": "~1.0.6",
"b": "^1.0.6",
"b": "*"
}When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>