Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "btg"

Question

Hey,

I am trying to publish on and serve the Backend WebAPI portion on IIS 10.0. When I do so, I get:

An error occurred while starting the application.

.NET Framework X86 v4.0.30319.42000    |   Microsoft.AspNetCore.Hosting version 1.1.1    |    Microsoft Windows 10.0.14393

Looking at IIS logs, I see error 500 but no other details.

2017-10-31 17:39:15 127.0.0.1 GET / - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+rv:56.0)+Gecko/20100101+Firefox/56.0 - 500 0 0 3952

Any ideas?

Hello,

I am trying to get a a button click event, similar to the code in the Angular 2 Phonebook Example to work. I have adapted code from the phonebook.component.ts and phonebook.component.html files. I am trying to call dataSource from one function to the other, but I don't know how to do it since they are both local variables. Does anyone have any ideas on how to deal with this?

Thanks for your help!

phonebook.component.ts

ngOnInit(): void {
        this.getData();


        this.loadDataView();

    }

 loadData(data: DataListDto): string {
        var dataid = data.id;
        var slid = dataid.toString() + ".jpg";
        var url = "http://localhost:4000/";

        var dataSource = url.concat(slid)

        this.message.confirm(
            this.l('ReadyToView', data.name),
            isConfirmed => {
                if (isConfirmed) {
                    this.notify.info(this.l('SuccessfullyLoaded'));
                   dataSource = url.concat(slid);
                }
            }
        );
        return dataSource;
    }
loadDataView(): void {
view.open(dataSource)
}

phonebook.component.html

<span class="slide-buttons">
                      <button (click)="loadSlide(slide)" title="{{l('View')}}" class="btn btn-circle btn-icon-only blue" href="javascript:;">
                        <i class="icon-plus"></i>
                      </button>
                    </span>

Hello,

I have worked through the documents on the ready-made PhoneBook app, but am having an issue.

I may have missed something, but I get the error:

Inconsistent accessibility: parameter type 'GetPeopleInput is less accessible than method 'IPeopleAppService.GetPeople(GetPeopleInput)
Inconsistent accessibility: parameter type 'GetPeopleInput is less accessible than method 'PeopleAppService.GetPeople(GetPeopleInput)

No other errors seem to appear. Any ideas?

THanks

I am trying to retrieve information from a JSON file and display it as elements on a dashboard. Do I need to add an entry in

/app/shared/service-proxies/service-proxies.ts

for a new Injectable service, then add it to the component.ts that will display it in the component.html file? Is there a better way to do this?

Hello,

I'm trying to get information contained in a JSON document to display information as a module on a dashboard on the Angular 2 project. I can get code to compile, but I don't know where I'm going wrong to get it to display. Can anyone help me? :)

info-json.component.html

<div [@routerTransition]>

  <div class="card">
    <div class="header" *ngFor="let item of data">
      <h4 class="title" ng-model="item.name">{{item.name}}</h4>
      <p class="category" ng-model="item.city">{{item.city}}</p>
    </div>
    <p>Description.</p>
  </div>

</div>

info-json.component.ts

import { Component, Injector, AfterViewInit } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import { Http } from '@angular/http';


@Component({
    templateUrl: './info-json.component.html',
    animations: [appModuleAnimation()]
})
export class InfoJsonComponent extends AppComponentBase implements AfterViewInit {


    constructor(
        injector: Injector,
        private _http : Http
    ) {
        super(injector);
    }

    public data: any[];

    ngAfterViewInit(): void {


        this._http.get("app/data/data.json")
            .subscribe((data) => {
                setTimeout(() => {
                    this.data = data.json();
                }, 1000);
            });
    }

}

dashboard.component.html

<div ng-include="'info-json.component.html'"></div>

main.module.ts

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { DashboardComponent } from './dashboard/dashboard.component';

import { ModalModule, TabsModule, TooltipModule } from 'ngx-bootstrap';
import { AppCommonModule } from '@app/shared/common/app-common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { MainRoutingModule } from './main-routing.module';

import { InfoJsonComponent } from './dashboard/info-json.component';

@NgModule({
    imports: [
        CommonModule,
        FormsModule,
        HttpModule,
        ModalModule,
        TabsModule,
        TooltipModule,
        AppCommonModule,
        UtilsModule,
        MainRoutingModule
    ],
    declarations: [
        DashboardComponent,
        CreateSlideModalComponent,
        InfoJsonComponent

    ]
})
export class MainModule { }

I am trying to add a JS library for a map ([https://leafletjs.com])) to a dashboard. I have tried including the JS library as a link in the dashboard.component.html file, but that does not seem to work.

Where do I include this JS library and what are the steps to use it in the Angular frontend? I want to be able to use Angular to edit properties of the map by clicking on buttons/elements in the dashboard, so I want to integrate it.

Thanks for your help!

Showing 1 to 6 of 6 entries