Difference between revisions of "AngularJS"
(26 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===stackexchanges=== | |||
http://stackoverflow.com/questions/14050195/angularjs-what-is-the-difference-between-and-in-directive-scope | |||
===debug=== | |||
http://24days.in/umbraco/2014/debugging-angularjs/ | |||
<pre> | |||
// Access whole scope | |||
angular.element(myDomElement).scope(); | |||
// Access and change variable in scope | |||
angular.element(myDomElement).scope().myVar = 5; | |||
angular.element(myDomElement).scope().myArray.push(newItem); | |||
// Update page to reflect changed variables | |||
angular.element(myDomElement).scope().$apply(); | |||
Or if you're using jQuery, this does the same thing... | |||
$('#elementId').scope(); | |||
$('#elementId').scope().$apply(); | |||
Another easy way to access a DOM element from the console (as jm mentioned) is to click on it in the 'elements' tab, and it automatically gets stored as $0. | |||
angular.element($0).scope(); | |||
</pre> | |||
===ng-conf 2015=== | |||
bennchpress https://github.com/angular/angular/tree/master/modules/benchpress | |||
http://victorsavkin.com/post/110170125256/change-detection-in-angular-2 | |||
http://victorsavkin.com/post/108837493941/better-support-for-functional-programming-in | |||
http://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html | |||
https://www.youtube.com/watch?v=XRYN2xt11Ek | |||
===markdown=== | |||
https://github.com/btford/angular-markdown-directive | |||
===angular-css=== | |||
https://github.com/door3/angular-css | |||
{{:ng2}} | |||
===ui-router=== | |||
http://scotch.io/tutorials/javascript/3-simple-tips-for-using-ui-router | |||
===directives=== | |||
====[https://www.youtube.com/watch?v=gE4hyIfUD-A component based directives]==== | |||
http://www.yearofmoo.com/ @yearofmoo | |||
[http://yom.nu/angular-scrapbook-slides slides] [http://yom.nu/angular-scrapbook-code code] | |||
http://stackoverflow.com/questions/14050195/what-is-the-difference-between-and-in-directive-scope | |||
http://onehungrymind.com/angularjs-sticky-notes-pt-2-isolated-scope/ | |||
http://stackoverflow.com/questions/13032621/need-some-examples-of-binding-attributes-in-custom-angularjs-tags/13033249#13033249 | |||
http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs/14049482#14049482 | |||
http://stackoverflow.com/questions/14908133/what-is-the-difference-between-vs-and-in-angularjs | |||
https://egghead.io/lessons/angularjs-isolate-scope-expression-binding | |||
https://thinkster.io/egghead/directive-to-directive-communication/ | |||
===videos=== | |||
*[https://www.youtube.com/watch?v=fWar75R1NGo restangular 2] | |||
*[https://www.youtube.com/watch?v=gNmWybAyBHI es6] | |||
*[https://www.youtube.com/watch?v=gNmWybAyBHI | |||
===performance=== | |||
http://bahmutov.calepin.co/improving-angular-web-app-performance-example.html | |||
{{:websockets}} | |||
===tutorials=== | |||
https://egghead.io/instructors/john-lindquist | |||
===articles=== | ===articles=== | ||
[[Checking online status in AngularJS]] | [[Checking online status in AngularJS]] | ||
===talks=== | |||
====angular-cngage 9/3/14==== | |||
Sharon, Sunny, Brent, Dick Williams | |||
[[mdtest]] | |||
====synchronization==== | ====synchronization==== | ||
https://github.com/jonashuckestein/node-object-sync | https://github.com/jonashuckestein/node-object-sync | ||
Line 25: | Line 108: | ||
==[http://angularjs.org/ Angular] [http://docs.angularjs.org/guide/filterdeveloper guide]== | ==[http://angularjs.org/ Angular] [http://docs.angularjs.org/guide/filterdeveloper guide]== | ||
[[javascript design patterns]] | [[javascript design patterns]] | ||
{{:testing}} | |||
===[[authentication]]=== | ===[[authentication]]=== | ||
===[http://www.williambrownstreet.net/blog/2014/04/faster-angularjs-rendering-angularjs-and-reactjs/ reactJS]=== | ===[http://www.williambrownstreet.net/blog/2014/04/faster-angularjs-rendering-angularjs-and-reactjs/ reactJS]=== |
Latest revision as of 10:53, 20 November 2015
stackexchanges
debug
http://24days.in/umbraco/2014/debugging-angularjs/
// Access whole scope angular.element(myDomElement).scope(); // Access and change variable in scope angular.element(myDomElement).scope().myVar = 5; angular.element(myDomElement).scope().myArray.push(newItem); // Update page to reflect changed variables angular.element(myDomElement).scope().$apply(); Or if you're using jQuery, this does the same thing... $('#elementId').scope(); $('#elementId').scope().$apply(); Another easy way to access a DOM element from the console (as jm mentioned) is to click on it in the 'elements' tab, and it automatically gets stored as $0. angular.element($0).scope();
ng-conf 2015
bennchpress https://github.com/angular/angular/tree/master/modules/benchpress
http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
http://victorsavkin.com/post/108837493941/better-support-for-functional-programming-in
http://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html
https://www.youtube.com/watch?v=XRYN2xt11Ek
markdown
https://github.com/btford/angular-markdown-directive
angular-css
https://github.com/door3/angular-css
ng-conf 5/2016
- tree-shaking-angular2-production-build-rollup-javascript
- https://github.com/juliemr/ngconf-2016-zones https://youtu.be/DltUEDy7ItY
- routing mishko slides talk https://github.com/brandonroberts/ngconf-router
- universal video https://mobile.angular.io https://github.com/angular/issue-zero
- angular cli needed powershell to install
ng 2.0
error TS2304: Cannot find name 'Promise' needs at top of file
///<reference path="../../../../node_modules/angular2/typings/browser.d.ts"/>
redux-angular
- https://plnkr.co/edit/MPi4274JPyxKK5rfrzUA?p=preview
- https://docs.google.com/document/d/1M46J8HZgsuXw0Mr_e5fOvSBk4t7JtLwgiv0_dVT_EOs/edit#
- https://skillsmatter.com/skillscasts/7384-lab-introduction-to-redux-in-angular-2
https://www.youtube.com/watch?v=uD6Okha_Yj0
Victor Savkins blog post on digest
http://blog.thoughtram.io/angular/2015/03/27/building-a-zippy-component-in-angular-2.html
ui-router
http://scotch.io/tutorials/javascript/3-simple-tips-for-using-ui-router
directives
component based directives
http://www.yearofmoo.com/ @yearofmoo
http://stackoverflow.com/questions/14050195/what-is-the-difference-between-and-in-directive-scope
http://onehungrymind.com/angularjs-sticky-notes-pt-2-isolated-scope/
http://stackoverflow.com/questions/14908133/what-is-the-difference-between-vs-and-in-angularjs
https://egghead.io/lessons/angularjs-isolate-scope-expression-binding
https://thinkster.io/egghead/directive-to-directive-communication/
videos
performance
http://bahmutov.calepin.co/improving-angular-web-app-performance-example.html
websockets
http://stackoverflow.com/questions/13546424/how-to-wait-for-a-websockets-readystate-to-change\
http://stackoverflow.com/questions/17301269/can-websocket-addresses-carry-parameters
http://stackoverflow.com/questions/25904478/send-extra-information-on-websocket-connection-creation
https://github.com/einaros/ws/blob/master/lib/WebSocket.js#L272
http://gonzalo123.com/2014/08/25/playing-with-websockets-angularjs-and-socket-io/
http://g00glen00b.be/spring-angular-sockjs/
tutorials
https://egghead.io/instructors/john-lindquist
articles
Checking online status in AngularJS
talks
angular-cngage 9/3/14
Sharon, Sunny, Brent, Dick Williams
synchronization
https://github.com/jonashuckestein/node-object-sync
https://github.com/jonashuckestein/node-object-sync
https://github.com/sayrer/json-sync
articles to read
http://ng-cookbook.s3.amazonaws.com/ng-cookbook.pdf
http://www.ng-newsletter.com/posts/directives.html
http://jsfiddle.net/prakgarnly/uD6GJ/
try catch and fail creating factory service called by controllers
Angular guide
testing
mocha
regression testing
Regression testing is a type of software testing that seeks to uncover new software bugs, or regressions, in existing functional and non-functional areas of a system after changes such as enhancements, patches or configuration changes, have been made to them. The purpose of regression testing is to ensure that changes such as those mentioned above have not introduced new faults. One of the main reasons for regression testing is to determine whether a change in one part of the software affects other parts of the software. Regression tests can be broadly categorized as functional tests or unit tests. Functional tests exercise the complete program with various inputs. Unit tests exercise individual functions, subroutines, or object methods
Contrast with non-regression testing (usually validation-test for a new issue), which aims to verify whether, after introducing or updating a given software application, the change has had the intended effect.
http://jsfiddle.net/fdietz/2Ny8x/
npm install mocha chai --save-dev
same as npm i -D mocha chai
create a test file src/index.test.js
var expect = require('chai').expect; var starWars = require('./index'); describe('starwars-names', function() { describe('all', function() { it('should be an array of strings', function() { expect(starWars.all).to.satisfy(isArrayOfStrings); function isArrayOfStrings(array) { return array.every(function(item) { return typeof item === 'string'; }); } }); it('should contain `Luke Skywalker`', function() { expect(starWars.all).to.include('Luke Skywalker'); }); }); describe('random', function() { it('should return a random item from the starWars.all', function() { var randomItem = starWars.random(); expect(starWars.all).to.include(randomItem); }); }); });
change package.json to run tests (automatically on update -w)
"scripts": { "test": "mocha src/index.test.js -w" },
npm test
authentication
reactJS
ng slider
coding styles
- controller styles
- promises w Q
- servics vs provider vs factory
- nodecors
- Access_control_CORS
- test-an-angularjs-service-with-jasmine
- mocking-angular-module-dependencies-in-jasmine-unit-tests
$resource
angular 2way to service
scopes and digest
AngularJS performs an OPTIONS HTTP request for a cross-origin resource jsbin
restangular
cors option request html5rocks
angularjs-authentication-with-cookies-vs-token
angular-seed instead ov yo angular
https://github.com/IgorMinar/angular-phonecat-tutorial
https://github.com/ajoslin/angular-mobile-nav
https://github.com/angular-widgets/angular-jqm
http://coenraets.org/blog/2013/11/sample-mobile-application-with-angularjs/ coenraets wine cellar
http://angularjs.org/ https://github.com/angular/angular.js
http://www.ekito.fr/people/?p=3224
MEAN Mongo Express Angular Node
avoid callback hell, fire events instead see
generic pool object for mysql connection from node
orm for mongodb
first parameter of callback is error
supertest and chai for testing api in mocha
http://www.rethinkdb.com/ more relational like
npm --save cats
angular owns the dom , jquery tries to
ngmodules.org is replacing jquery stuff
angular batarang - most useful chrome extension
http://egghead.io to learn angular
for model in angular use https://github.com/mgonto/restangular
faisal does yo angular:service apiService
faisal.abid@gmail.com @FaisalAbid