小编HD.*_*D..的帖子

Angular js Div仅显示3秒

我是角度js的新手.我完成了div hide和show.只是我想知道如何隐藏或显示div仅3秒.在这里我附上我使用的代码.

HTML代码:

<div ng-hide="loginAlertMessage">Dynamic user feedback message comes here.</div>    
<a ng-click="forgotPassword()">Forgot Password?</a>
Run Code Online (Sandbox Code Playgroud)

角度js代码:

$scope.loginAlertMessage = true;

    $scope.forgotPassword = function () {
         $scope.loginAlertMessage=false;    
    };
Run Code Online (Sandbox Code Playgroud)

angularjs

18
推荐指数
1
解决办法
3万
查看次数

如何每2分钟调用一次功能

如何在anular js中每两分钟调用一次保存函数.请帮我.

 $scope.save = function () {
        $http({
        url : '/api/products',
        method : "POST",
         },
        data : $scope.product,          
    }).success(function (data) {}
Run Code Online (Sandbox Code Playgroud)

angularjs

10
推荐指数
2
解决办法
3万
查看次数

Angular 6:属性'of'在类型'typeof Observable'上不存在

我正在使用Angular 6 使用"rxjs":"^ 6.0.0",

错误:属性'of'在类型'typeof Observable'上不存在.

import { Injectable } from '@angular/core';
import { TranslateLoader } from '@ngx-translate/core';
import { Observable, Subject, pipe, of } from 'rxjs';


@Injectable()
export class MiTranslateLoaderService implements TranslateLoader {

  getTranslation(lang: string): Observable<any> {
    return Observable.of({
      lbl_select: 'Select',
    });
  }
}
Run Code Online (Sandbox Code Playgroud)

rxjs angular6 rxjs6

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

Angular Js文件上传

我是棱角分明的新手.我想用这个上传文件.我使用以下链接

http://jsfiddle.net/jasonals/WEvwz/27/?upload.html

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://blueimp.github.com/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>
<script src="http://blueimp.github.com/jQuery-File-Upload/js/jquery.fileupload.js"></script>
<div ng-controller='TestCtrl'>
  <div>
      <input id="fileupload" type="file" name="files[]" data-url="/" multiple>
      <ul>
          <li ng-repeat="file in fileList">
              {{file.name}}
          </li>
      </ul>
  </div>

  <button ng-click='addButtonClicked()'>Add File</button>
</div>

controlller file.
$(document).ready(function(){
    $('#fileupload').fileupload({
        dataType: 'json'});
});

TestCtrl = function($scope){
    $scope.fileList = [];
    $('#fileupload').bind('fileuploadadd', function(e, data){
        // Add the files to the list
        numFiles = $scope.fileList.length
        for (var i=0; i < data.files.length; ++i) {
            var file = data.files[i];
        // .$apply to update angular when something else makes changes
        $scope.$apply( …
Run Code Online (Sandbox Code Playgroud)

django jquery angularjs

3
推荐指数
1
解决办法
6619
查看次数

占位符不在angularjs select2中工作

这是我尝试过的代码.我试图添加带有angularjs代码和HTML代码的占位符,但它不适用于这两种情况.请帮助我或建议我在这种情况下如何做

 <select ui-select2="select2Options" 
style="width:100%" 
ng-model="SelectedProcessandIngredients"
 data-placeholder="Select or Add Process/Ingredient" 
ng-options="c.name group by c.status for c in colors"
 ng-change="selectedinnerLoop()" >          
        </select>
Run Code Online (Sandbox Code Playgroud)

Angular js代码:

$scope.select2Options = {
        placeholder : "Select or Add Process/Ingredient",
        formatResult : processList,
        formatSelection : processList,
        escapeMarkup : function (m) {
        return m;
        }

    };
Run Code Online (Sandbox Code Playgroud)

angularjs angularjs-select2

2
推荐指数
1
解决办法
3639
查看次数

如何创建一个三角形的 div 并附加另一个 div

在这里,我使用 2 div 创建了 html 元素,但我无法创建真正需要的三角形 div。我附上了一张图片。

这是html代码:

<div style="background-color:#999999;margin-bottom:20px;"> 
   <div class="activeHeader h4Bold" style="width:40%;display:inline-block"><span class="h3Bold" style="margin-right:12px;color:#ffffff!important">1</span> Define Finished Product and Tracability Workflow</div>

    <div class="inactive h4Bold" style="width:40%;display:inline-block"><span class="h3Bold" style="margin-right:12px;color:#000000!important">2</span> 
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

和CSS:

.activeHeader
{
    padding:9px 24px 9px 12px;
    background-color:#000000;
    color:#ffffff;
}
.inactive
{
    padding:9px 24px 9px 12px;
    background-color:#cccccc;
    color:#000000;
}
Run Code Online (Sandbox Code Playgroud)

jsfiddle http://jsfiddle.net/prashantbirajdar123/YM76v/

输出图像:

在此处输入图片说明

html css

2
推荐指数
1
解决办法
2161
查看次数

选择选项font-family在Mac OS中不起作用(chrome和safari浏览器问题)和window safari浏览器问题

我正在尝试将字体系列应用于每个选项。它正在与chorme和mozila合作。但在野生动物园中,它仅提供默认字体。你能建议如何做到这一点吗?

<select>
    <option value="'Proxima Nova Alt Light'" style="font-family: 'Proxima Nova Alt Light'">Proxima Nova</option>
    <option value="Arial" style="font-family: Arial">Arial</option>
    <option value="Helvetica" style="font-family: Helvetica">Helvetica</option>
    <option value="Verdana" style="font-family: Verdana">Verdana</option>
    <option value="Courier" style="font-family: Courier" >Courier</option>
    <option value="CraftyGirlsRegular" style="font-family: CraftyGirlsRegular" >Crafty Girls Regular</option>
    <option value="MarckScriptRegular" style="font-family: MarckScriptRegular" >Marck Script Regular</option>
</select>
Run Code Online (Sandbox Code Playgroud)

html javascript

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

Extjs如何在组合框中添加关闭图标

如何在最右边的组合框列表项中添加关闭图标

 Ext.define('ezdi.view.SaveSearchComboboxView', {
        extend : 'Ext.form.field.ComboBox',
        alias : 'widget.saveSearchComboboxAlias',
        queryMode : 'local',
        id : 'saveSearchComboId',
        store : 'SaveSearchComboboxStore',
        emptyText : 'Saved Searches',
        displayField : 'searchQueryName',
        valueField : 'searchQueryId',
        lazyInit: false
    });
Run Code Online (Sandbox Code Playgroud)

extjs

0
推荐指数
1
解决办法
3676
查看次数

标签 统计

angularjs ×4

html ×2

angular6 ×1

angularjs-select2 ×1

css ×1

django ×1

extjs ×1

javascript ×1

jquery ×1

rxjs ×1

rxjs6 ×1