Angular路由

ng-class="{className:true,className1:false}"

$scope.$watch(要检测的数据的名字,function(){

//code

}.true);- - > 是否深度监视;监视对象的时候需要使用深度监视;

angular中的跨域:

 回调函数的名字是:JSON_CALLBACK

 $http.jsonp(url).success(function(data){ });

 SPA:

single pade application 单页面应用;

路由:

告诉你该往哪儿去;

需要配合route.js使用;

路由需要配置才能运行;

app.config();

配置路由的步骤:

1.引入angular-route.js

2.app.config(function($routeProvider){

$routeProvider.when('/index',{

templateUrl:url,

controller:ctrl

}).otherwise({

redirectTo:'默认显示页面';

})

});

 

angular-form:

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容