- Passing Arugments to $on() in AngularJS from $emit() and $broadcast()
- trigger click event from angularjs directive
- Communication Between Services and Controllers
- How can i broadcast an object in angularjs
- AngularJS – Communicating Between Controllers
- 6 Common Pitfalls Using Scopes
- More AngularJS Magic to Supercharge your Webapp
- [Ev
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
<snippet> | |
<content><![CDATA[ | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>${1:title}</title> | |
<link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet"> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet"> |
#SublimeText2 Extensions July 2013
- Prefixr
- SCSS Snippets
- AdvancedNewFile
- AngularJS Attributes Completion
- ASCII Decorator
- Nettuts+ Fetch
- Minifier
- Color Scheme - Default
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
//Enabling Javascript | |
Include javascript inside HTML: | |
<script> | |
x = 3; | |
</script> | |
//Reference external file: | |
<script src="http://example.com/script.js"></script> | |
//Redirect if javascript disabled: |
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 dsApp = angular.module('dsApp', []); | |
2 | |
3 | |
4 dsApp.directive('ngDsFade', function () { | |
5 return function (scope, element, attrs) { | |
6 element.css('display', 'none'); | |
7 scope.$watch(attrs.ngDsFade, function (value) { | |
8 if (value) { | |
9 element.fadeIn(200); | |
10 } else { |
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 lang="en" ng-app> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>title</title> | |
<link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet"> | |
<style>body{font-family: 'Noto Sans';}</style> | |
</head> |
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('mkShortcut', function($document) { | |
// Ref: http://goo.gl/7XDys | |
function fireEvent(element, event) { | |
if (document.createEvent) { | |
// dispatch for firefox + others | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent(event, true, true ); // event type,bubbling,cancelable |
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) { |