Skip to main content

Angular component development

One of the main advantages of wyStack is that it allows you to add custom Angular components. Let's create a custom Angular component.

👉 Choose User interfaces in the main menu.
Select the Angular user interface. Select the RELATED tab.
Choose COMPONENTS on the left.

Adding a new Angular component

Create a new Angular component and choose a name. We will use HelloWorldComponent.

Apply the component name to source-code in the COMPONENT, STYLE and TEMPLATE tabs.

⚠️ Important: your component name should always end with Component. The class name of the component always needs to start with: WyCustomComponent_....

In our example the only correct class name for this component is: WyCustomComponent_HelloWorldComponent

IntelliSense in Angular components

The Angular Component editor supports IntelliSense. Type wy. to discover all available services that can be injected in the constructor of your Angular component. The mostly used service is the IDataService, it provides direct access to your ServiceLayer ASP.NET Core OData API.

Type your app's namespace to get access to the typings of all classes defined in your domain model. For example:

var x: HelloWorld.NgLayer.MyClass = {};
x.Name = 'test';
x.Orders = [];