Compare jQuery and AngularJS: https://www.airpair.com/angularjs/posts/jquery-angularjs-comparison-migration-walkthrough
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
<cfscript> | |
component accessors="true" { | |
serializePath = []; | |
javaSys = createObject("java", "java.lang.System"); | |
public any function includePath(required string path) { |
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
<cfscript> | |
component accessors="true" extends="Base" { | |
property string name; | |
property State state; | |
} | |
</cfscript> |
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('app').config(function ($provide) { | |
$provide.provider('myService', function () { | |
var config; | |
return { | |
setConfig: function (_config) { | |
config = _config; | |
}, | |
$get: function (otherService) { | |
// use config in here |
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('mc.inputs').constant 'FormData', | |
name: 'TestForm' | |
prompt: 'Test Form' | |
description: 'Test Form Description' | |
render: 'one-column' | |
items: [ | |
type: 'group' | |
render: 'group' | |
items: [ | |
{ |
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 (angular) { | |
var mod = angular.module('ng.forms', []); | |
['form', 'ngForm'].forEach(function(name) { | |
return mod.directive(name, function($parse) { | |
return { | |
restrict: 'EA', | |
require: 'form', | |
link: function(scope, element, attrs, ngForm) { | |
var startMode = $parse(attrs.startMode)(scope) || 'edit' |
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 table = []; | |
var add = function (name, cmd) { | |
table.push({'Description': name, 'Command/Shortcut': cmd}); | |
}; | |
add("Search Sources Filename", "Cmd+o"); | |
add("Find in File", "Cmd+f"); | |
add("Search Across All Files", "Cmd+Opt+f"); | |
add("Filter for Function/Selector", "Cmd+Shift+O"); |
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
searchTimeout = $interval(-> | |
# Build more explicit query string to return better lucene results | |
# As of 2014-10-20 wildcard searches seem broken. i.e., `q=brendon+b*` | |
# returns a result as if it was `q=b*`, skipping all characters before | |
# the escaped space [ms] | |
formattedQuery = "#{queryString}*" unless hasSpace = / /.test queryString | |
if hasSpace | |
if css.isPhone(origQueryString) | |
formattedQuery = "phone:#{queryString}*" | |
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
var directive = ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; | |
return directive; | |
function link(scope, element, attr, ctrls) { | |
var ngModelController = ctrls[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
it('should allow lazy loaded module in named outlet', | |
fakeAsync(inject([Router, NgModuleFactoryLoader], (router: Router, loader: SpyNgModuleFactoryLoader) => { | |
@Component({selector: 'lazy', template: 'lazy-loaded'}) | |
class LazyComponent {} | |
@NgModule({ | |
declarations: [LazyComponent], | |
imports: [RouterModule.forChild([{path: 'lazy', component: LazyComponent}])] | |
}) |
OlderNewer