|
import { BrowserModule } from '@angular/platform-browser';
---------------------------
---------------------------
---------------------------
import { ScheduleAllModule, RecurrenceEditorAllModule } from '@syncfusion/ej2-ng-schedule';
---------------------------
---------------------------
---------------------------
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
, HttpClientModule, ScheduleAllModule // Here we need to import the modules which are used in the application
],
providers: [
DataService
],
bootstrap: [AppComponent]
})
export class AppModule { } |
|
<body>
<the-shop></the-shop>
</body>
</html> |
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace WebApplication1
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseSpaStaticFiles();
app.UseMvc();
app.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
} |
|
/* You can add global styles to this file, and also import other style files */
@import url('../node_modules/@syncfusion/ej2-schedule/styles/material.css'); |
|
import { Component, ViewEncapsulation } from '@angular/core';
import { MonthService, DayService, WeekService, WorkWeekService, EventSettingsModel, ActionEventArgs } from '@syncfusion/ej2-ng-schedule';
import { UrlAdaptor, DataManager } from '@syncfusion/ej2-data';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [DayService, WeekService, WorkWeekService, MonthService],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
public showQuickInfo: boolean = false;
public selectedDate: Date = new Date(2018, 6, 25);
private dataManger: DataManager = new DataManager({
url: 'http://localhost:54738/Home/LoadData', // Here pass your REST WEB API load data
crudUrl: 'http://localhost:54738/Home/UpdateData', // Here pass your REST WEB API update data
adaptor: new UrlAdaptor
});
public eventSettings: EventSettingsModel = { dataSource: this.dataManger };
}
|