[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
I just opened this site, hoping to learn...
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 36
Thread images: 6
I just opened this site, hoping to learn Angular and looked at the code at this URL: https://angular.io/

Now my eyes hurt. Am I alone?
>>
Fucking awful.
>>
I mean, what the fuck is this perversion?

import {Component} from 'angular2/core';
import {Todo} from './todo';
import {TodoList} from './todo_list';
import {TodoForm} from './todo_form';

@Component({
selector: 'todo-app',
template: `
<h2>Todo</h2>
<span>{{remaining}} of {{todos.length}} remaining</span>
[ <a href="javascript: false" (click)="archive()">archive</a> ]

<todo-list [todos]="todos"></todo-list>
<todo-form (newTask)="addTask($event)"></todo-form>`,
directives: [TodoList, TodoForm]
})
export class TodoApp {
todos: Todo[] = [
{text:'learn angular', done:true},
{text:'build an angular app', done:false}
];

get remaining(): number {
return this.todos.reduce((count, todo: Todo) => count + todo.done, 0);
}

archive(): void {
var oldTodos = this.todos;
this.todos = [];
oldTodos.forEach((todo: Todo) => {
if (!todo.done) this.todos.push(todo);
});
}

addTask(task: Todo) {
this.todos.push(task);
}
}
>>
File: 1452678277659.jpg (149 KB, 1282x1080) Image search: [iqdb] [SauceNao] [Google]
1452678277659.jpg
149 KB, 1282x1080
here I am debugging some fucking Angular 1 for a code cutoff in the morning and my boss wants to migrate to angular 2 in the coming months.
>mfw web technologies are hot shit.
>>
>TypeScript
Dropped.
>>
>>52398910
Only this line makes me puke:

  template: `
<h2>Todo</h2>
>>
>>52397812
disgusting
also angulol is obsolete, angulol2 is round the corner and not backward compatible
don't waste your time anon, it's the memest scripting language of all time
>>
>>52398249
>20 line to push and slice an array
HAHAHAHAHA
>>
>>52397812
>not learning superior ember.js instead
>>
>>52399479
>learning anything dot js
just learn javascript you pleb
>>
>>52399497
>what are modern webapplications
>what is dynamic data binding
>what is a component based webapp
>what is htmlbars
>what is ember data
>what is ember cli
>>
>>52399460
this is 2
>>
you should skip the angular meme and learn the react meme instead
>>
OP here

Im looking at Ember, and it looks MUCH better
>>
File: s.png (74 KB, 596x480) Image search: [iqdb] [SauceNao] [Google]
s.png
74 KB, 596x480
Why would anyone use this shit?
>>
Angular 2 is incredibly awkward.
Why are they actively bullying you into using their special language (Typescript) and the whole node.js build pipeline & framework?
>>
>>52399534
memescripting.js
>>
>>52398249
That's ES6, son, and you better get fucking used to it.
>>
>>52400272
It runs faster on mobile.

That is the only reason I have ever heard.
>>
File: ember_Ember-Light.png (66 KB, 2731x1205) Image search: [iqdb] [SauceNao] [Google]
ember_Ember-Light.png
66 KB, 2731x1205
>>52399479
>>52399896
toldcha
>>
>>52400619
Not sure still what kind of project to write, that takes advantage of this, but at least the language doesnt look like a total mess
>>
>>52400660
It's still es6 (thanks to babel.js), but much more sane than the meme frameworks.
Just go through the guides on their website or search sjwhub for ember projects...
>>
>>52400716
>sjwhub
What is "SJWHub"? I do not know this...
>>
File: femalecodertocat.png (104 KB, 896x896) Image search: [iqdb] [SauceNao] [Google]
femalecodertocat.png
104 KB, 896x896
>>52400779
>>
>>52400838
What? Isnt that GitHub?
>>
File: cuckhub.png (64 KB, 800x665) Image search: [iqdb] [SauceNao] [Google]
cuckhub.png
64 KB, 800x665
>>52400860
Pretty much.
>>
>>52400881
Ok, I get it... any famous projects made with ember?
>>
>>52400619
>>52400898
Use vuze instead you plebs. At least it's a clean library, not a convoluted framework.
>>
>>52400838

>Tired
>Hoodie
>Jeans
>Drinking coffee

8/10, would code with.

>>52400881

>Cancer

-8/10, get out of here with your gender politics.
>>
>>52400272
>typescript is an angular meme
uwotm8? Typescript is just type-safe js, it's not bound to angular or anything.
>>
>>52399534
>what is killing the internet
>>
I think I'm going to use polymer instead.

Web components are the future, anyway.
>>
>>52398249
it todos of todos todos and todos
meanwhile todos a lot of them
>>
>>52397812
Having the entire website build itself on the front end, through JS, is absolutely retarded.

I mean I can see the point if you run something that gets as many hits as Facebook, where 1 byte of optimization can reduce bandwidth usage by several gigabytes, but come on.

And then there is the fuckups concerning Angular 1 and 2 not being compatible (so I read).

JavaScript frameworks are a fucking joke.
>>
>>52406199
It enables you to make different apps working through the same API...
In addition, mobile apps can be rendered without the first bit of data being loaded, right after its launch.

Anyway, I agree that webdev is going full retard with a hundred of libs doing the same thing and the "hype" thing.

I hope that by the next 5 years we'll get a solid web with only 2 or 3 ways of doing things.
For now, you always have to learn new shit (that you're going to use for less than a year).
>>
>>52400162
Is that supposed to be bait?
Those fucking node modules are optional.
If he wants a better hello world it probably couldn't write it himself either.
Thread replies: 36
Thread images: 6
Thread DB ID: 424146



[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.