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 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
//Regular Expressions List | |
//Short Tutorial | |
\ // the escape character - used to find an instance of a metacharacter like a period, brackets, etc. | |
. // match any character except newline | |
x // match any instance of x | |
^x // match any character except x | |
[x] // match any instance of x in the bracketed range - [abxyz] will match any instance of a, b, x, y, or z | |
| // an OR operator - [x|y] will match an instance of x or y |
This file contains 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:hover { | |
-webkit-filter: grayscale(0%); | |
-webkit-transition: .5s ease-in-out; | |
-moz-filter: grayscale(0%); | |
-moz-transition: .5s ease-in-out; | |
-o-filter: grayscale(0%); | |
-o-transition: .5s ease-in-out; | |
} | |
img { |
This file contains 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="row"> | |
<div class="col-md-2 col-sm-2 col-xs-2"> | |
<p><button class="btn btn-primary btn-sm" id="get-weather-btn"><span>Get Weather</span></button></p> | |
</div><!-- .col --> | |
<div class="col-md-10 col-sm-10 col-xs-10"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">OpenWeatherMap API Response</div> | |
<div class="panel-body"> | |
<p>Enter Address: <input type="text" id="address" class="form-control" placeholder="City, State"/></p> | |
<textarea id="weather" class="form-control"></textarea> |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains 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
import UIKit | |
protocol CollectionViewCellConfigurable { | |
typealias ItemType | |
typealias CellType: UICollectionViewCell | |
static func reuseIdentifierForIndexPath(indexPath: NSIndexPath) -> String | |
static func configureCellAtIndexPath(indexPath: NSIndexPath, item: ItemType, cell: CellType) | |
} |
This file contains 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
import Foundation | |
/// Represents the Log facilities | |
struct Log { | |
/// Prints in debug only | |
static func debug(_ msg: String, line: Int = #line, fileName: String = #file, funcName: String = #function) { | |
#if DEBUG | |
let fname = (fileName as NSString).lastPathComponent | |
print("[\(fname) \(funcName):\(line)]", msg) | |
#endif |
- JavaScript Weekly: http://javascriptweekly.com/
- HTML5 Weekly: http://html5weekly.com/
- CSS Weekly: http://css-weekly.com/
- Web Design Weekly: http://web-design-weekly.com/
- Web Tools Weekly: http://webtoolsweekly.com/
- React.js Newsletter: http://reactjsnewsletter.com/
This file contains 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
config: | |
target: "http://localhost:8080" | |
phases: | |
- duration: 60 | |
arrivalRate: 1 | |
processor: "./processor.js" | |
scenarios: | |
- name: "Load the options page" | |
flow: | |
- get: |
This file contains 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 classic AJAX call - dispatch before the request, and after it comes back | |
function myThunkActionCreator(someValue) { | |
return (dispatch, getState) => { | |
dispatch({type : "REQUEST_STARTED"}); | |
myAjaxLib.post("/someEndpoint", {data : someValue}) | |
.then( | |
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}), | |
error => dispatch({type : "REQUEST_FAILED", error : error}) | |
); |
OlderNewer