我有文本区域框,我需要在文本区域输入文本时检查数据.我写的更改方法但是这里不起作用的是代码.
<textarea (change)="textAreaEmpty(textValue)" #textValue></textarea>
Run Code Online (Sandbox Code Playgroud)
零件
textAreaEmpty(text:string){
if(text.length > 0)
console.log(text);
}
Run Code Online (Sandbox Code Playgroud)
我还需要检查用户在文本区域中输入了多少行.我在anuglar2中找到任何解决方案,我能够使用jquery或javascript获取数据,但我不想使用它.我想在角度2使用它,任何身体可以帮助我吗?
我可以在index.html中动态设置标签,角度为4的元概念.但是当我尝试删除标签时,没有删除,我怎样才能删除之前添加的标签?
这是我尝试过的:设置标签:
import {Meta ,MetaDefinition } from '@angular/platform-browser';
@Component({
selector: 'app-share-video',
templateUrl: './share-video.component.html',
})
export class ShareVideoComponent implements OnInit {
constructor(public metaServic:Meta){}
ngOnInit(){
const ogtitle: MetaDefinition = { name: 'og:title', content: 'Grace' };
const ogSitename: MetaDefinition = { name: 'og:site_name', content: 'My Favourite Albums'};
const ogUrl: MetaDefinition = { name: 'og:url', content: 'https://angular.io/docs/ts/latest/api/platform-browser/index/Meta-class.html'};
const ogdesc: MetaDefinition = { name: 'og:description', content: 'angular 4 share video description'};
this.metaService.addTag(ogtitle);
this.metaService.addTag(ogSitename);
this.metaService.addTag(ogUrl);
this.metaService.addTag(ogdesc);
}
ngOnDestroy() {
this.metaService.removeTag("property='og:title'");
this.metaService.removeTag("property='og:site_name'");
this.metaService.removeTag("property='og:url'");
this.metaService.removeTag("property='og:description'");
} …Run Code Online (Sandbox Code Playgroud) 我需要你的帮助才能找出我的错误.我正在使用springboot(后端)x Angularjs(前端).尝试加载localhost:8080时,我得到一个GET(angular.js)文件net :: ERR_ABORTED.我的角度文件也没有发现任何错误.所以这是我的代码:
//for the springcontroller
@RestController
public class EmployeeController {
@Autowired
EmployeeService es;
@RequestMapping(method=RequestMethod.GET,value="/employees")
public List<Employee> getAllEmployees(){
return es.getAllEmployees();
}
@RequestMapping(method=RequestMethod.GET,value="/employees/{name}")
public Employee getEmployee(@PathVariable String name){
return es.getEmployee(name);
}
@RequestMapping(method=RequestMethod.POST,value="/employees")
public void addEmployee(@RequestBody Employee emp){
es.addEmployee(emp);
}
@RequestMapping(method=RequestMethod.PUT,value="/employees/{name}")
public void updateEmployee(@RequestBody Employee emp,@PathVariable String name){
es.updateEmployee(emp,name);
}
@RequestMapping(method=RequestMethod.DELETE,value="/employees/{name}")
public void deleteEmployee(@PathVariable String name){
es.deleteEmployee(name);
}
}
Run Code Online (Sandbox Code Playgroud)
对于我的app.js:
(function(){
'use strict';
var app = angular.module('myApp',['ngRoute','myApp.controller']);
app.config(function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'index.html',
controller: 'HomeController'
});
});
})();
Run Code Online (Sandbox Code Playgroud)
对于我的HomeController.js
var …Run Code Online (Sandbox Code Playgroud) 我可以在 PC 和 android 设备中播放 m3u8 文件,但我无法在 iOS 移动设备和 safari 浏览器中播放这些文件,我将 android 设备的 overrideNative 禁用为“true”,因此它可以在机器人。但是我们不应该为 iOS 和 safari 禁用本机,因为 iOS Safari 使用本机播放器,所以我为 iOS 设置了覆盖的 false。但它不工作。我正在关注新的 videojs 版本。
视频js:6.4.0
videojs 贡献 hls:5.12.2
videojs 闪存:2.0.1
例子
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls</title>
<link href="https://unpkg.com/video.js@6.4.0/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@6.4.0/dist/video.js"></script>
<script src="https://unpkg.com/videojs-flash@2.0.1/dist/videojs-flash.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls@5.12.2/dist/videojs-contrib-hls.js"></script>
</head>
<body>
<h1>Video.js Example Embed</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="600" height="268"
data-setup='{}'>
<source src="https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8" type="application/x-mpegURL">
</video>
<script>
let videojshls= videojs('my_video_1', { html5: {
nativeAudioTracks: false,
nativeVideoTracks: false, …Run Code Online (Sandbox Code Playgroud) angular ×2
angularjs ×1
ios ×1
java ×1
javascript ×1
meta-tags ×1
safari ×1
spring-boot ×1
spring-mvc ×1
tags ×1
video.js ×1