小编Mat*_*yev的帖子

Visual Studio代码中的选项卡空格

我写作TypeScriptHTML文件,标签变成了空格.这是我第一次使用Visual Studio Code.

我试图更改设置并重新启动,但没有任何改变.

我配置的设置:

{
  "editor.insertSpaces": false
}
Run Code Online (Sandbox Code Playgroud)

我想谷歌它,我发现我做了正确的一步,当我加入TypeScript.html,但它不改变我的喜好...

编辑1:

我发现标签工作在.ts文件中,但不是TypeScript文件...

tabs spaces typescript visual-studio-code

106
推荐指数
9
解决办法
12万
查看次数

Angularjs秒到时间过滤

我正在使用Angularjs.

我有一串数字,例如:610.这意味着秒.我需要它改为:10:10或者610.

我需要几秒钟的时间过滤.我该怎么做?

谢谢.

time date angularjs

24
推荐指数
4
解决办法
4万
查看次数

使用查询AngularFire检索记录

我正在使用Firebase,Backend-as-a-Service,用于我的网站应用程序,由AngularJS编程.

我想使用db查询来获取记录,例如: WHERE name == 'The Legend Of Korra'

我在Firebase服务器中有一系列电视剧,JSON代码:

{
  "series" : {
    "-JkqSvwyDw5F9DvGUu6b" : {
      "createdAt" : 1426842959884,
      "creators" : "Michael Dante DiMartino,Bryan Konietzko",
      "description" : "The series follows the adventures of protagonist twelve-year-old Aang and his friends, who must bring peace and unity to the world by ending the Fire Lord's war against the other three nations.",
      "episode_reset" : true,
      "genres" : "Action,Adventure,Fantasy,Comedy-drama",
      "keywords" : "avatar,the last airbender",
      "name" : "Avatar: The Last Airbender",
      "official_website" …
Run Code Online (Sandbox Code Playgroud)

angularjs firebase angularfire

7
推荐指数
1
解决办法
8895
查看次数

Angularjs在窗口大小调整时更改范围变量

我正在尝试更改范围变量:$scope.tab每次窗口调整大小时$scope.tab == 'more'.

码:

$scope.closeMoreTab = function() {
    if($scope.tab == 'more')
        $scope.tab = 'extras';
};

angular.element($window).bind('resize', function() {
    $scope.closeMoreTab();
});
Run Code Online (Sandbox Code Playgroud)

好吧,它确实在调用$scope.closeMoreTab(),而且它确实在改变$scope.tab变量,但实际上,它并没有改变视图上的任何内容.

我试过了:

console.log($scope);
Run Code Online (Sandbox Code Playgroud)

要检查变量tab,它确实变为'extras',但是当我这样做时:

<div>{{ tab }}</div>
Run Code Online (Sandbox Code Playgroud)

它告诉我,当前的tab变量仍然是"更多"

请帮忙.我坚持了1个小时,不知道为什么会这样或者做什么.

非常感谢

javascript scope angularjs

4
推荐指数
1
解决办法
2396
查看次数