小编use*_*694的帖子

Angular.js从指令返回值到控制器

我的指令有问题.我找到了这个插件:http://allensarkisyan.github.io/VideoFrame/,现在我在我的控制器中有这个插件实现:

HTML

<div class="row" ng-controller="searchDetailCtrl">
<section id="videoContainer">
    <video id="videoPlayer" width="100%" controls src="asset/tc3.mp4" type="video/mp4">
    </video>
</section>

<section id="videoControls">
    <div class="row more-margin-bottom" ng-repeat="asset in AssetDetail">
        <div class="col-sm-12">
            <button ng-click="playVideo()" class="btn btn-large btn-inverse"><i class="fa fa-play-circle fa-2x"></i></button>
                <button ng-click="pauseVideo()" class="btn btn-large btn-inverse"><i class="fa fa-pause fa-2x"></i></button>
                <button ng-click="seekBackward()" class="btn btn-large btn-inverse"><i class="fa fa-step-backward fa-2x"></i></button>
                <button ng-click="seekForward()" class="btn btn-large btn-inverse"><i class="fa fa-step-forward fa-2x"></i></button>
                <button id="markIn" ng-click="markIn()">MARKIN</button>
                <button id="markOut" ng-click="markOut()">MARKOUT</button>
                <button id="savePicture" ng-click="createPreviewScreenShot()">PICTURE</button>
            </div>
        </div>
    </section>
</div>
Run Code Online (Sandbox Code Playgroud)

CONTROLLER

mwm3.controller('newSegmentationCtrl', function($scope, $timeout, SegmentationService, $route) …
Run Code Online (Sandbox Code Playgroud)

javascript angularjs angularjs-directive angularjs-scope

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

angular-cli和bootstrap 4

我用angular 2移动我的第一步,特别是我使用angular-cli官方工具来创建新项目.

我以这种方式创建了一个新项目

ng new [my-project-name]
Run Code Online (Sandbox Code Playgroud)

该项目是正确创建的.

之后我想安装bootstrap 4,然后按照angular-cli页面中的官方指南进行操作.

我用npm安装bootstrap:

npm install bootstrap@next
Run Code Online (Sandbox Code Playgroud)

我在angular-cli.json中添加了这一行:

"scripts": [
  "../node_modules/jquery/dist/jquery.js",
  "../node_modules/tether/dist/js/tether.js",
  "../node_modules/bootstrap/dist/js/bootstrap.js"
],
"styles": [
  "styles.css",
  "../node_modules/bootstrap/dist/css/bootstrap.css"
],
Run Code Online (Sandbox Code Playgroud)

在app对象中.

当我构建应用程序并在服务器中运行它: ng serve

我没有在index.html中找到bootstrap css和javascript的参考.

我不明白是否在我的index.html中自动添加了此文件的导入,或者我需要手动添加它.

bootstrap-4 angular-cli angular

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

正则表达式逃避HTML标记

我想仅从html标记字符串名称中提取.我想获得这个结果:

  • 农场1
  • 分期
  • STAGING_SYSTEM_10

我可以使用什么类型的正则表达式?

<div class='singleNode'><i class='fa fa-cogs'></i><span>Farm 1<span class='badge badge-primary'></span><span></div>

 <div class='singleNode'><i class='fa fa-cubes'></i><span>STAGING<span class='badge badge-primary'></span><span></div>

<div class='singleNode'><i class='fa fa-desktop'></i><span>STAGING_SYSTEM_10<span class='badge badge-primary'></span><span></div>
Run Code Online (Sandbox Code Playgroud)

html javascript regex

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