随笔分类 - angularJs
摘要://模块名字var filters = angular.module("customFilter",[]);//过滤器名字filters.filter("uniqueCategory",function(){ return function(container,property){ if (angu
阅读全文
摘要:var app=angular.module("myapp",["ngRoute"]);app.controller("ctr",function($scope){ });//angular1.6.0以上版本需要配置app.config(["$locationProvider",function($
阅读全文
摘要:AngularJS 路由 本章节我们将为大家介绍 AngularJS 路由。 AngularJS 路由允许我们通过不同的 URL 访问不同的内容。 通过 AngularJS 可以实现多视图的单页Web应用(single page web application,SPA)。 通常我们的URL形式为 h
阅读全文
摘要:在单页面应用程序中比如angular应用,我们需要根据url的变化(即:不同的请求),来分配不同的资源。根据请求的URL来决定执行哪个模块,这个过程叫路由,同时,我们需要设计路由规则。 下面给出一个简单的小demo: html结构: js结构: 总结: angular中的路由需要使用它的ngRout
阅读全文

浙公网安备 33010602011771号