This file contains 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
/** | |
* Sets focus to this element if the value of focus-me is true. | |
* @example | |
* <a ng-click="addName=true">add name</a> | |
* <input ng-show="addName" type="text" ng-model="name" focus-me="{{addName}}" /> | |
*/ | |
app.directive('focusMe', ['$timeout', function($timeout) { | |
return { | |
scope: { trigger: '@focusMe' }, | |
link: function(scope, element) { |
This file contains 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
<canvas tc-chartjs-pie chart-data="pieData" chart-options="{segmentShowStroke: false}" width="25" height="25"></canvas> |
This file contains 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
<nvd3-pie-chart id="{{id}}" | |
data="pieData" | |
width="80" | |
height="80" | |
x="xFunction()" | |
y="yFunction()"> | |
</nvd3-pie-chart> |
This file contains 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
<nvd3 options="pieOptions" data="pieData"></nvd3> |
This file contains 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
$pieSize: 18px; | |
.pie-wrap { // own class | |
float: left; | |
svg { | |
display: inline-block; | |
width: $pieSize; | |
height: $pieSize; | |
margin: 4px; |
This file contains 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
// AtScript | |
class MyClass { | |
methodA(name:string):int { | |
var length:int = name.length; | |
return length; | |
} | |
} | |
// ES6 | |
class MyClass { |
This file contains 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
// AtScript | |
@Directive({ | |
selector: '[blink]' | |
}) | |
class Blink { | |
constructor(elment:Element, options:Options, timeout:Timeout) {} | |
} | |
// ES6 | |
class Blink { |
This file contains 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
var text = "this is a {highlighted} text"; | |
var regex = /\{\S+?\}/g; | |
var html = text.replace(regex, '<mark>$&</mark>'); // $& = matched value = {highlight} | |
alert(html); // => "this is a <mark>{highlighted}</mark> text" | |
var regex2 = /\{(\S+?)\}/g; // you need ()-brackets to get $1 | |
var html2 = text.replace(regex2, '<mark>$1</mark>'); // $1 = first () = highlight | |
alert(html2); // => "this is a <mark>highlighted</mark> text" |
This file contains 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
#facebox | |
position: absolute | |
top: 0 | |
left: 0 | |
z-index: 100 | |
text-align: left | |
#facebox .popup | |
position:relative | |
border: 3px solid rgba(0,0,0,0) |
OlderNewer