Angularjs无控制器 [英] Angularjs without controller

查看:136
本文介绍了Angularjs无控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我看到一个鸣叫从帕维尔·科兹洛夫斯基的控制器将在Angularjs 2.0

有没有人知道如何将angularjs是没有控制器?目前,我处理控制器几乎所有的东西,我不知道什么时候下一个版本推出了我们code将如何发生大的变化。


解决方案

Yes.You're权利。

什么也不会在AngularJs 2.0?


  1. 控制器


  2. 指令定义对象(DDO)


  3. $范围


  4. angular.module


  5. JqLite


角2.0核心幻灯片从NG-欧洲议论:角2.0核心

关于你的问题:为什么需要去与AJS 2?如果您的应用提供您需要什么AJS 1.X那么为什么你需要将其更改为AJS 2.B'cos AJS 1.X系列将继续,因为它是未来也。因此,没有必要担心。但是,如果你开始一个新的应用程序,然后你可以用AJS 2启动(如果将当时可用)。这是我给你的建议。

谷歌说怎么样的AJS 1.X:


  

如果您今天构建Web应用程序,这是你版本
  应该使用。这是尝试和真正的版本,我们真的相信
  英寸拥有超过1600的应用程序在谷歌与角1.x的建成,我们是
  致力于支持其作为一流的AngularJS版本的
  很长一段时间来。


Today I saw a tweet from Pawel Kozlowski that controllers will go away in Angularjs 2.0

Is there anyone know how would angularjs be without controllers? Currently I handle almost everything in controller, and I dont know when the next version released how much our code will change.

解决方案

Yes.You're right.

What will not be in AngularJs 2.0?

  1. Controllers

  2. Directive Definition Object (DDO)

  3. $scope

  4. angular.module

  5. JqLite

Angular 2.0 Core slides from ng-europe talk: Angular 2.0 Core

About Your question : Why do you need to go with AJS 2? If your app is giving what you need with AJS 1.X then why do you need to change it to AJS 2.B'cos AJS 1.X series will continue as it is in future also. So no need to worry about it. But if you'll start a new app then you can start it with AJS 2 (if it'll available at that time). That is my suggestion to you.

What Google says about the AJS 1.X :

If you are building web applications today, this is the version you should use. This is the tried and true version that we really believe in. With over 1600 apps at Google built with Angular 1.x, we are committed to supporting it as the first class AngularJS version for a long time to come.

这篇关于Angularjs无控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆