Angular doesnโt depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angularโs element abstraction. For example, in a directive you get access to the element that the directive applies to:
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 gulp = require('gulp'); | |
| var uglify = require('gulp-uglify'); | |
| var concat = require('gulp-concat'); | |
| var templates = require('gulp-angular-templatecache'); | |
| var minifyHTML = require('gulp-minify-html'); | |
| // Minify and templateCache your Angular Templates | |
| // Add a 'templates' module dependency to your app: | |
| // var app = angular.module('appname', [ ... , 'templates']); |
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
| /usr/share/zoneinfo/Hongkong | |
| > Wed Jan 01 2014 00:00:00 GMT+0800 (HKT) | |
| > Mon Sep 01 2014 00:00:00 GMT+0800 (HKT) | |
| /usr/share/zoneinfo/Pacific/Easter | |
| > Wed Jan 01 2014 00:00:00 GMT-0500 (EASST) | |
| > Mon Sep 01 2014 00:00:00 GMT-0600 (EAST) | |
| /usr/share/zoneinfo/Pacific/Norfolk | |
| > Wed Jan 01 2014 00:00:00 GMT+1130 (NFT) |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
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
| /** | |
| * A generic confirmation for risky actions. | |
| * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function | |
| */ | |
| angular.module('app').directive('ngReallyClick', [function() { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| element.bind('click', function() { | |
| var message = attrs.ngReallyMessage; |
People
:bowtie: |
๐ :smile: |
๐ :laughing: |
|---|---|---|
๐ :blush: |
๐ :smiley: |
:relaxed: |
๐ :smirk: |
๐ :heart_eyes: |
๐ :kissing_heart: |
๐ :kissing_closed_eyes: |
๐ณ :flushed: |
๐ :relieved: |
๐ :satisfied: |
๐ :grin: |
๐ :wink: |
๐ :stuck_out_tongue_winking_eye: |
๐ :stuck_out_tongue_closed_eyes: |
๐ :grinning: |
๐ :kissing: |
๐ :kissing_smiling_eyes: |
๐ :stuck_out_tongue: |
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 = require(process.cwd() + '/app'); | |
| var winston = require('winston'); | |
| var _ = require('lodash'); | |
| // Set up logger | |
| var customColors = { | |
| trace: 'white', | |
| debug: 'green', | |
| info: 'green', | |
| warn: 'yellow', |
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('uuidApp', ['lvl.services']) | |
| .controller('uuidCtl', ['$scope', 'uuid', function($scope, uuid){ | |
| $scope.generateUuid = function() { | |
| $scope.new = uuid.new(); | |
| $scope.nInfo = new Date(); | |
| }; | |
| $scope.showEmpty = function() { | |
| $scope.empty = uuid.empty(); |