I sense a weakness in someone's editor/IDE. Personally I'd call it controller.js and expect my tools to not make that problemmatic
I sense a weakness in someone's editor/IDE. Personally I'd call it controller.js and expect my tools to not make that problemmatic
foo.service.js
foo.directive.js
would all be in different folders, one for controllers, one for services one for directives etc. if you have multiple tabs open in your ide like Webstorm you'd only see foo.js three times over, if you did not prefix it, and be hard pressed to know which is which at first glance.
With that said Angular 1 is dead long live Angular 2 :)
I'm not suggesting putting all components in component folder and all services in services folder.
https://egghead.io/lessons/angular-2-organizing-angular-2-pr...
I hope "somebody" forks Angular 1. The 2 way binding (ng-model) makes CRUD apps very simple to write, even if digest/watch type operations are somewhat slow. As far as I can tell, the ng-model feature is OUT of Angular 2, and some kind of React style event communication must be set up instead.
I don't know React yet, but Angular 2 sounds like they are chasing the same design goals: be efficient at gluing huge mounds of similar crap to a never ending page (e.g. - a la Facebook). I am more interested in quickly grinding out code for huge CRUD forms with a large number of distinct fields.
2 way data-binding is still in Angular2, as well as oneWay Binding to the input and one way binding from output. I've heard others make the claim ng-model and 2 way binding are gone, which is wrong. https://egghead.io/lessons/angular-2-using-ng-model-for-two-...
There are giant performance benefits on the horizon with Angular2 in terms of server side rendering with Angular Universal and state management with ngrx/store.
In Angular2 http is handled as an observable, no longer a promise, so there is a difference in syntax but that falls in line with ES7 format
Sounds like somebody beat some sense into the Angular 2 team - "don't remove the single feature that differentiates your library and makes prototyping an app easy"
Now if I can only find examples in good old Javascript, instead of fugly, Java-esque, Typescript.
Re: types/Typescript - loved this quote:
"Better type-checks interestingly found only just a few bugs"
https://jaxenter.com/angularjs-interview-angular-2-typescrip...
Rant for another day: insisting on static typing, but ignoring the mayhem caused by operators and operator precedence (to say nothing of user created operators)
The two way binding works by automatically updating, but also allowing you to hook into the outputs through a template convention (if bound via [(foo)], one can define a fooChange handler to hook into updates).
Me neither.
> When almost every class has the same prefix. IE, when a user clicks on the button, a SmurfAccountView passes a SmurfAccountDTO to the SmurfAccountController. The SmurfID is used to fetch a SmurfOrderHistory which is passed to the SmurfHistoryMatch before forwarding to either SmurfHistoryReviewView or SmurfHistoryReportingView. If a SmurfErrorEvent occurs it is logged by SmurfErrorLogger to ${app}/smurf/log/smurf/smurflog.log