This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.用cd + 盘符: 打开项目所在的盘 2.用cd + 项目所在的文件夹路径 打开项目文件夹 3.在项目的文件夹 用 rails s 命令来启动项目的服务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git pull --rebase origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.bootstrap框架下icon图表不显示的原因: | |
Ⅰ.「src: url('../font/fontawesome-webfont.eot?v=3.2.1')」路径错误或者缺失font文件; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1、git reflog show (找到第一列类似4d5579a这样的id) | |
2、git cherry-pick 4d5579a | |
如果2不能实现,继续操作, | |
3、git status (查看是否有修改) | |
4、git reset --hard(删除没用的修改) | |
5、git cherry-pick 4d5579a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
使用UI-Router的AngularJS路由 | |
AngularJS为制作单页的应用程序提供了一个强大的方式。我们在创建单页的应用程序时,路由是很重要的。我们希望我们的导航感觉像一个正常的网站,,还不使我们的网站刷新。我们已经仔细讲解过使用通常的ngRoute方法的Angular路由。 | |
今天我们将看看使用UI-Router的路由。 | |
概述 | |
什么是AngularUI Router? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
情况非常少,实际上几乎我们所有的代码都包在$scope.$apply()里面,像ng-click,controller的初始化,$http的回调函数等。在这些情况下,我们不需要自己调用,实际上我们也不能自己调用,否则在$apply()方法里面再调用$apply()方法会抛出错误。如果我们需要在一个新的执行序列中运行代码时才真正需要用到它,而且当且仅当这个新的执行序列不是被angular JS的库的方法创建的,这个时候我们需要将代码用$scope.$apply()包起来。 | |
下面用一个例子解释: | |
[HTML] | |
<div ng:app ng-controller="Ctrl">{{message}}</div> | |
[Javascript] | |
复制代码 | |
functionCtrl($scope) { |