发表于: 2017-05-05 23:39:02
1 970
今天完成的事情:(一定要写非常细致的内容,比如说学会了盒子模型,了解了Margin)
任务8:后台系统--angular传参和指令
在单页应用里如何通过url传参; angular的指令是什么; 如何去自定义一个指令
明天计划的事情:(一定要写非常细致的内容)
基于HTML5的图片预览和上传
遇到的问题:(遇到什么困难,怎么解决的)
var myApp = angular.module("myApp", ["ui.router"]);
myApp.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.when('/', '/index');
$urlRouterProvider.otherwise('/index');
});
收获:(通过今天的学习,学到了什么知识)
The ngRoute
module helps your application to become a Single Page Application.
What is Routing in AngularJS?
If you want to navigate to different pages in your application, but you also want the application to be a SPA (Single Page Application), with no page reloading, you can use the ngRoute
module.
The ngRoute
module routes your application to different pages without reloading the entire application.
ngRoute能让浏览器不刷新页面而导航到不同页面。
评论