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
The MIT License | |
Copyright (c) 2014 doxx (https://github.com/doxxx) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
<div class="popover {{ placement }}" ng-class="{ in: isOpen(), fade: animation() }"> | |
<div class="arrow"> | |
</div> | |
<div class="popover-inner"> | |
<h3 class="popover-title" ng-bind="title" ng-show="title"></h3> | |
<div class="popover-content" ng-include="content"></div> | |
</div> | |
</div> |
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 () { | |
var common = angular.module("common"); | |
common.directive( 'popoverIncludePopup', function () { | |
return { | |
restrict: 'EA', | |
replace: true, | |
scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' }, | |
templateUrl: 'partials/directives/popover.html' | |
}; | |
}); |
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
<button data-bind="click: function(data, event) { onButtonClick('save',data, event) }">Save</button> | |
<button data-bind="click: function(data, event) { onButtonClick('cancel',data, event) }">Cancel</button> |
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
<button data-bind="click : onButtonClick.bind($root,'save')">Save</button> | |
<button data-bind="click : onButtonClick.bind($root,'cancel')">Cancel</button> |
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
$scope.onButtonClick = function(event,action){ | |
// your code. | |
}; |
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
<button data-ng-click="onButtonClick($event,'save')">Save</button> | |
<button data-ng-click="onButtonClick($event,'cancel')">Cancel</button> |
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
myContent("Hello You") |
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
$scope.myContent = "Hello You"; |
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
var myContent = ko.observable("Hello World"); |
NewerOlder