Difference between revisions of "AngularJS"

From Wiki2
 
(47 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===
[[Checking online status in AngularJS]]
===talks===
====angular-cngage 9/3/14====
Sharon, Sunny, Brent, Dick Williams
[[mdtest]]
====synchronization====
https://github.com/jonashuckestein/node-object-sync
https://github.com/jonashuckestein/node-object-sync
https://github.com/sayrer/json-sync
===articles to read===
https://weblogs.asp.net/dwahlin/creating-custom-angularjs-directives-part-3-isolate-scope-and-function-parameters
http://ng-cookbook.s3.amazonaws.com/ng-cookbook.pdf
http://www.ng-newsletter.com/posts/directives.html
[http://hueypetersen.com/posts/2013/06/24/typeahead-with-angular/ typeahead with angular]
http://jsfiddle.net/prakgarnly/uD6GJ/
[http://www.benlesh.com/2013/02/angularjs-creating-service-with-http.html try catch and fail creating factory service called by controllers]
==[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]]
{{:testing}}


===[$resource]===
===[[authentication]]===
===[http://www.williambrownstreet.net/blog/2014/04/faster-angularjs-rendering-angularjs-and-reactjs/ reactJS]===
===[http://ngokevin.com/blog/angularslider/ ng slider]===
===coding styles===
*[http://stackoverflow.com/questions/18734094/understanding-coding-style-in-angularjs controller styles]
*[http://www.joezimjs.com/javascript/patterns-asynchronous-programming-promises/ promises w Q]
*[http://stackoverflow.com/questions/15666048/angular-js-service-vs-provider-vs-factory servics vs provider vs factory]
*[https://github.com/troygoode/node-cors nodecors]
*[https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS Access_control_CORS]
*[http://stackoverflow.com/questions/13013772/how-do-i-test-an-angularjs-service-with-jasmine test-an-angularjs-service-with-jasmine]
*[http://stackoverflow.com/questions/17554727/mocking-angular-module-dependencies-in-jasmine-unit-tests?rq=1 mocking-angular-module-dependencies-in-jasmine-unit-tests]
===[[$resource]]===


===[https://github.com/mbertolacci/angular-service-utilities angular 2way to service]===
===[https://github.com/mbertolacci/angular-service-utilities angular 2way to service]===

Latest revision as of 10:53, 20 November 2015

stackexchanges

http://stackoverflow.com/questions/14050195/angularjs-what-is-the-difference-between-and-in-directive-scope

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

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


ng2 cheatsheet

https://docs.google.com/presentation/d/1ETDm0R_BxZUcumqDxnG8puKbq_gHvMZyOwmq09wUk68/edit#slide=id.g5a490f318_0_0

rethinking controllers


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

singleton or DI

token auth

ui-router

http://scotch.io/tutorials/javascript/3-simple-tips-for-using-ui-router

directives

component based directives

http://www.yearofmoo.com/ @yearofmoo

slides 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

performance

http://bahmutov.calepin.co/improving-angular-web-app-performance-example.html

websockets

http://stackoverflow.com/questions/16280747/sending-message-to-a-specific-connected-users-using-websocket

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/

http://fdietz.github.io/2015/04/15/day-3-how-to-build-your-own-team-chat-in-five-days-expressjs-socket-io-and-angularjs.html

tutorials

https://egghead.io/instructors/john-lindquist

articles

Checking online status in AngularJS

talks

angular-cngage 9/3/14

Sharon, Sunny, Brent, Dick Williams

mdtest

synchronization

https://github.com/jonashuckestein/node-object-sync

https://github.com/jonashuckestein/node-object-sync

https://github.com/sayrer/json-sync

articles to read

https://weblogs.asp.net/dwahlin/creating-custom-angularjs-directives-part-3-isolate-scope-and-function-parameters

http://ng-cookbook.s3.amazonaws.com/ng-cookbook.pdf

http://www.ng-newsletter.com/posts/directives.html

typeahead with angular

http://jsfiddle.net/prakgarnly/uD6GJ/


try catch and fail creating factory service called by controllers

Angular guide

javascript design patterns

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

$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

rethinkdb javascript guide

angular-seed instead ov yo angular

mongodb restangular

egghead tutorials

local storage

directive tutorial

authrntication

https://github.com/IgorMinar/angular-phonecat-tutorial

https://github.com/ajoslin/angular-mobile-nav

https://github.com/angular-widgets/angular-jqm

polling

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

http://angular-tips.com/blog/2013/08/why-does-angular-dot-js-rock/

MEAN Mongo Express Angular Node

tutorial

rest mongo express

todolist tut

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