-
angular – 如何在离子页面中定义可选的段参数?
所属栏目:[安全] 日期:2020-12-17 热度:88
如何在Ionic 3 PWA中定义可选参数? 我当前的@IonicPage装饰器看起来像: @IonicPage({ segment: "landing/:id"}) 但是id参数必须是可选的.如果我没有传递id,我收到此错误: Uncaught (in promise): invalid views to insert 怎么做? 提前致谢! 解决方法[详细]
-
当用户在搜索框外单击时,角度搜索框需要消失
所属栏目:[安全] 日期:2020-12-17 热度:154
我正在Angular(4)中创建一个包含搜索框的应用程序.当用户搜索时,搜索变量变为true.当用户在搜索框外部点击时,此变量需要变为false. 我有gotton这个用于处理(模糊)和(焦点)属性: mat-form-field class="full-width" input matInput #searchBox (blur)="searc[详细]
-
angularjs – 业力中服务呼叫成功响应的代码覆盖率
所属栏目:[安全] 日期:2020-12-17 热度:61
我有这样的功能 $scope.openMail=function(mail){ DocumentTypes.getDocument(function(response){ $scope.documentTypes=response.result; $log.log("documentTypes",$scope.documentTypes); })} 以上乐趣的规格是 it("should test open mail",function(){[详细]
-
属性’FroalaEditor’在’JQueryStatic’类型上不存在 – Angula
所属栏目:[安全] 日期:2020-12-17 热度:141
我使用的是使用’ JQuery‘的Angular 4’ FroalaEditor‘. 我成功地实现了它. 现在我需要在该插件中添加自定义按钮. 我在solution之后找到了 import { Component,OnInit,ViewEncapsulation } from '@angular/core';import * as $from 'jquery';@Component({[详细]
-
Angular 4中页面刷新时出现404错误
所属栏目:[安全] 日期:2020-12-17 热度:113
我们使用’ng build –prod’cli命令部署了angular 4应用程序,并在IIS 8.5上创建了’dist’文件夹,当我们运行应用程序时,它工作正常,但如果按下F5键则会出现404错误. 注意:请不要建议使用(useHash:true),如果建议我们如何从url中删除’#’. 如果有人可以建[详细]
-
angular – ng2-intl – 静态解析符号值时出错
所属栏目:[安全] 日期:2020-12-17 热度:66
我意识到这是一个常见问题,但我无法弄清楚一个有效的实现. 我正在使用Angular 4.2.6和ng2-intl 2.0.0-rc.3. 我尝试过以下内容但仍然无法正常工作: export function intlFactory(http:Http) { return new IntlStaticLoader(http,'../../locale','.json');}@N[详细]
-
如何生成Angular app的服务器端PDF?
所属栏目:[安全] 日期:2020-12-17 热度:178
我们有一个Angular(v4)应用程序,它根据我们的API接收的 JSON数据和文件存储中的图像生成表单.使用该应用程序的每个客户端都有一个包含不同数据和图像的数字(数百个).已请求一项功能,允许客户将其表单以zip格式导出为PDF. 我们正在探索解决方案的策略是,当收[详细]
-
angular 2 – 在elementRef上设置选择
所属栏目:[安全] 日期:2020-12-17 热度:199
我有这个选择: let selection = window.getSelection(); 而这个元素参考: @ViewChild('contentEditable') public el: ElementRef; 例如,这个文本在contenteditable elementRef中: This is some text 我选择’some’然后丢失了选择但是使用getSelection()[详细]
-
angular – 在提交编辑表单获取空值后,当我检查控制台时
所属栏目:[安全] 日期:2020-12-17 热度:160
我正在使用表单生成器和表单组. 一旦我提交表格,我将获得空值.请告诉我问题出在哪里. 以下是我的代码. 我的目标是: [ { "firstname": "ramu","lastname": "mothukuri","city": "chennai","street": "sivan koiil street","pin": "600024" } ] form [formGro[详细]
-
使用ng2-pdf-viewer在Angular中显示PDF文件
所属栏目:[安全] 日期:2020-12-17 热度:133
我正在尝试使用 ng2-pdf-viewer组件从我的ASP.NET Web API后端显示多个PDF.我已经将PdfViewerComponent添加到我的模块的声明中,并且提供的示例工作正常: import { Component } from '@angular/core';@Component({ selector: 'example-app',template: ` div[详细]
-
有没有办法在Raspberry Pi上运行Angular应用程序?
所属栏目:[安全] 日期:2020-12-17 热度:136
我说的是Angular(2). 当我在Raspberry Browser中打开应用程序时,我只看到一个空白页面. 将安装另一个浏览器帮助? 解决方法 假设代码中没有错误,它只取决于浏览器引擎. 您可以在此处查看当前的浏览器支持:browser-support[详细]
-
angular – 在一个应用程序中存储多个ngrx
所属栏目:[安全] 日期:2020-12-17 热度:69
我们是一个大型Angular应用程序模块的开发人员.模块彼此独立,由不同的团队开发.我们想在我们的模块中使用ngrx商店. 另一个模块已经有一个ngrx商店.如果我尝试以通常的方式将商店添加到我们的module.ts: @NgModule({ imports: [ ... StoreModule.provideStor[详细]
-
angular – 在模块中使用另一个模块:在路由中导入vs使用loadChi
所属栏目:[安全] 日期:2020-12-17 热度:187
在我对Angular的探索中,我发现了两种可能的方法来在另一个模块中使用一个模块. (使用angular-express-starter project作为参考) 方法1: 在进口数组中声明它. For example @NgModule({ declarations: [ AppComponent ],imports: [ BrowserModule,SharedModul[详细]
-
Swagger / OpenAPI:如何在构建过程中集成typescript / angular
所属栏目:[安全] 日期:2020-12-17 热度:132
使用swagger-codegen-maven-plugin生成 Java / Spring Server-Stubs 在我的Spring Boot Java项目中,我使用swagger-codegen-maven-plugin从我的Swagger 2.0 api.yml生成Spring MVC控制器接口(服务器存根). maven构建过程中的集成非常简单.它像我以前用WSDLs的[详细]
-
angular – 路由”的配置无效:路由必须指定路径或匹配器
所属栏目:[安全] 日期:2020-12-17 热度:97
AppRouting.ts import { BrowserModule } from '@angular/platform-browser';import { NgModule } from '@angular/core'; import { Routes,RouterModule } from '@angular/router';import { HomeComponent } from '../buyer/home/home.component';const rout[详细]
-
错误:422(不可处理的实体). Angular4
所属栏目:[安全] 日期:2020-12-17 热度:176
我试图将localhost:4200上的Angular4数据发布到localhost:8000上的API.我和Postman合作得很好,但是和Angular不一样.然后我得到: 无法加载资源:服务器响应状态为422(不可处理的实体) 这是发布到api的服务: @Injectable()export class ApiService { const[详细]
-
angular – 如何确定是否应将模块导入CoreModule或SharedModule
所属栏目:[安全] 日期:2020-12-17 热度:133
在angular4应用程序中,给出了以下模块: ReactiveFormsModule, FormsModule, HttpModule, TranslateModule,(翻译模块) AgGridModule.withComponents([]),(表框架) DatepickerModule.forRoot(),(以及ngx-bootstrap的一般模块) 导入它们的正确位置在哪里:Core[详细]
-
Angular 2/4.重用策略.如何通知组件它已被重用?
所属栏目:[安全] 日期:2020-12-17 热度:144
我们使用NG2 / 4的东西.我们已经实现了一个自定义重用策略来完成从摘要到详细信息屏幕的导航,因此当用户单击后退按钮时,我们使摘要屏幕保持相同状态(防止重新创建). 问题是当我们在子屏幕上编辑记录并且我们回到主屏幕时,我们必须重新加载特定数据,而不是所[详细]
-
angular – 活动表单 – 跳过取消验证
所属栏目:[安全] 日期:2020-12-17 热度:194
我有一个反应形式,它有取消和提交按钮: button (click)="cancel($event)" type="button" class="ui button"Cancel/buttonbutton [disabled]="..." type="submit" class="ui button primary"Store/button 现在如果我点击提交(商店)按钮验证开始 – 一切都很[详细]
-
Angular 2和Node.js项目结构
所属栏目:[安全] 日期:2020-12-17 热度:159
我正在努力研究Node.js和Angular 2网站的项目结构. 我用: Nodejs Express用于服务器端. Angular 2为客户端. 在我发现的大多数指南中,人们将两种技术都放在同一个项目中.它们有一个客户端和服务器文件夹,但package.json位于根目录中.这对我来说似乎很奇怪,因[详细]
-
angularjs – 如何使用如果离子弹出中的条件
所属栏目:[安全] 日期:2020-12-17 热度:64
我创建了一个常用的Popup屏幕,它在三个模块中使用但三个模块有不同的标题.我没有给出标题中的条件,是否有可能给我解决方案. 弹出代码在这里: function showPopup () { $scope.data = {}; var myPopup = $ionicPopup.show({ template: 'input focus-me type=[详细]
-
Angular使用带有转义元素属性的innerHTML
所属栏目:[安全] 日期:2020-12-17 热度:153
嗨我从这样的休息服务器有一个html respose: h3Center Align/h3np style="text-align: center;"This is a paragraph. It is center aligned. Center is,but nature,a fence sitter. A flip flopper. It has a difficult time making up its mind. It wan[详细]
-
AngularJS使用templateHtml的路径作为模块名称
所属栏目:[安全] 日期:2020-12-17 热度:189
我注意到AngularJS UI Bootstrap对模板使用以下方法: angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function($templateCache) { $templateCache.put("uib/template/progressbar/bar.html" } 所以我认为这是一个非常好的[详细]
-
Angular 4 Ngx-datatable Filter非工作对象为null但是被访问(即
所属栏目:[安全] 日期:2020-12-17 热度:120
我正在使用ngx-datatable,我试图为我的代码添加过滤器功能,但它根本不起作用. 这是我的代码: import {Component,OnInit,ViewChild,ViewEncapsulation} from '@angular/core';import {NavbarService} from '../../Services/navbar.service';import {DataServ[详细]
-
angular – 使用@HostListener不起作用的窗口滚动事件
所属栏目:[安全] 日期:2020-12-17 热度:172
在Angular 4应用程序中向下滚动时,我遇到问题.无法检测到滚动事件. 标题放在布局组件中,我想要滚动的内容放在路径组件中.可能那是问题吗? 这是我实现的代码. 在layout.component.ts中 import { Component,OnInit,HostListener,Inject } from '@angular/core[详细]