我有两个json文件"a.json“和"b.json”。当用户单击每个不同的按钮时,我需要显示不同的表单。我的问题是,当我单击第一个按钮时,它会显示第一个表单,但当我单击第二个按钮时,它不会显示第二个表单。我需要一次显示一个表单,即当我单击第二个按钮时,它会移除第一个表单并显示第二个表单。
$scope.getFromAFile= function () {
// body...
var inputs=[];
$http.get('a.json').success (function(data){
var
我有一个用angular4编写的代码,我希望表单只出现在按钮上,即点击“注册”按钮。然而,出现了一个问题。按钮和表单都会出现。我用模型驱动的表单方法制作表单,我有三个文件app.component.js、app.module.js和app.component.html .please帮助。
代码是:app.component.ts
import { Component } from '@angular/core';
import {MyserviceService} from './servicecomponent/myservice.service'
i
当我点击一个按钮时,我正试图在中动画我的创建笔记表单,但它只是立即出现而没有过渡。我想要做的是添加一个类,将其显示从“none”设置为“flex”。
这是表单的外观(HTML)
//Finally, this is the javascript that I'm trying to get it to work
const createBtn = document.getElementById('createBtn');
const form = document.getElementById('noteForm');
createBtn.addE