#All CDN's
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" /> | |
| <meta charset=utf-8 /> | |
| <title>Angular Tree</title> | |
| </head> | |
| <body ng-app="myApp" ng-controller="myController"> | |
| <ul ng-tree="family"> | |
| <li select="selected()">{{item.name}}</li> |
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
| //JSFiddle eaxample - http://jsfiddle.net/JSWorld/Hp4W7/32/ | |
| orderBy:['group','sub'] |
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
| angular.module('ymusica').controller('AlbumSearch', ['$scope', 'Albums', 'Artists', '$q', function($scope, albums, artists, $q) { | |
| $scope.albums = []; | |
| $scope.artists = []; | |
| var terms = new Rx.Subject(); | |
| $scope.searchMusic = terms.onNext.bind(terms); | |
| terms.sample(250) |
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
| //Prevent your website being displayed inside IFRAME | |
| //http://roshanbh.com.np/2008/06/prevent-website-displayed-inside-iframe.html | |
| if (top.location.href != self.location.href) | |
| top.location.href = self.location.href; |
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
| Date.prototype.getWeek = function() { | |
| var onejan = new Date(this.getFullYear(),0,1); | |
| return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7); | |
| } | |
| var today = new Date(); | |
| var weekno = today.getWeek(); |
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 app = angular.module('app', []); | |
| app.directive('yaTree', function () { | |
| return { | |
| restrict: 'A', | |
| transclude: 'element', | |
| priority: 1000, | |
| terminal: true, | |
| compile: function (tElement, tAttrs, transclude) { |
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
| myApp.directive('switchButton', function() { | |
| return { | |
| require: 'ngModel', | |
| restrict: 'E', | |
| template: '<div class="btn-group">' + | |
| '<button class="btn on" ng-click="on()"></button>' + | |
| '<button class="btn off" ng-click="off()"></button>' + | |
| '</div>', | |
| link: function($scope, element, attrs, controller) { | |
| $scope.on = function() { |
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
| img.grayscale.disabled { | |
| filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
| -webkit-filter: grayscale(0%); | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset='UTF-8' /> | |
| <link rel='stylesheet' href='style.css' /> | |
| </head> | |
| <body> | |
| <form id="myform"> | |
| <input type="text" name="login" id="login" /> |