新的角度模块创建错误

时间:2018-02-23 11:28:03

标签: angular npm angular-module

几天前我开始从头开始学习Angular 4。在获得一些想法后,我开始为npm设计一个模块。我设计了这个模块,然后我按照这篇medium.com文章进行了操作,并按照每一步进行操作。 npm install data-formss ---获取依赖

项目的

github链接

现在问题是我在项目中使用了这个依赖项

<data-form [input-parameter]= "data" [post-url]="url"></data-form>

其中

data = [
    { type: 1, labelName: 'UserName: ', placeHolder: 'Username', inputProp: { type: 'text', id: 'username', minLen: "4", maxLen: "15", notAllowed: "$" }, validationText: "Looks Good!", inValidationText: "Enter Something" },
    { type: 1, labelName: 'Password: ', placeHolder: 'Password', inputProp: { type: 'password', id: 'pass', minLen: "4", maxLen: "15", notAllowed: "$" }, validationText: "Looks Good!", inValidationText: "Enter Something" },
    { type: 2, labelName: 'Gender: ', inputProp: { type: '', id: 'gender' }, options: [{ value: '0', key: 'Male' }, { value: '1', key: 'Female' }], inValidationText: "You forgot to mark something" , inline : false, mandatory: 1, noInOneLine: 1 },
    { type: 3, labelName: 'Gender: ', inputProp: { type: '', id: 'gender' }, options: [{ value: '0', key: 'Male' }, { value: '1', key: 'Female' }], inline : true, noInOneLine: 1 },
    { type: 4, labelName: 'Comment: ', inputProp: { type: '', id: 'comment', rowSize: '2' }, inValidationText: "Enter Something" },
    //{ type: 5, labelName: 'Image: ', inputProp: { type: '', id: 'image' }, inValidationText: "Enter Something" },
    { type: 6, labelName: 'Location: ', inputProp: { type: '', id: 'location' }, options: [{ value: '0', key: 'Chennai' }, { value: '1', key: 'Mumbai' }], inline : false, inValidationText: "Select Something" },
  ];
url= "someurl";

我收到错误

zone.js:2935 GET http://localhost:4200/data-form.component.html 404 (Not Found)

和每个其他可用组件的类似错误。 任何人都可以帮我这个吗?

更新

构建工具 typescript,通过Angular编译器(ngc)进行转换, rollupjs包装, uglify-js用于缩小。

对于项目树结构,请检查github链接。

N.B。 github中的自述文件尚未完成。

0 个答案:

没有答案