Frequently asked questions

There is a strict standard limit for the memory usage in V8 of around 1.7 GB, if you do not increase it manually.
To increase this limit you have to use this flag on building or serving the application:
--max_old_space_size=8048
Example: npm run production-aot --max_old_space_size=8048
You can check here how to use parent-keys parameter to construct dependant combos or dependant list-pickers as seen in the example.
All the OntimizeWeb components that use services for retrieving data have the attributes query-method, paginated-query-method, insert-method, update-method and deleted-method. The purpose of these attributes is allowing the component to use your own CRUD methods defined in your service. With this you can define, for example, as many query methods as you want. You can see the complete documentation here.
query-on-event is an input of the OServiceBaseComponent. This input will reference to an event of the component that must listen to in order to perform its query. The component will wait until the event you choose is fired to perform the request of the data. For example: query-on-event=”componentAttr.onValueChange”. This will perform the query when the value of the component changes. You can check how to use it here and a example of dependant combos here.
Ontimize Web application follows material design guidelines proposed by Google. You can check here how to configure these palettes by both using predefined ones and creating new ones.
You can also change the typography of the app by following the steps described here.
You can get that backend information in your login function by creating a function that returns the values that you need from the backend or from an API.
You can check the normal login function here
It will be something like this:

if (userName && userName.length > 0 && password && password.length > 0) {
  const self = this;
    this.loginService.login(userName, password).subscribe(() => {
      self.getInfoFromBackend() //In this function is where you can get info from backend, connect to an API ...
      .then(res => {
        self.sessionExpired = false;
        self.router.navigate(['../'], { relativeTo: this.actRoute });
      })
      .catch(e => console.log(e));
  }, this.handleError);
}
While working with angular, many times we need to get data from URL. Data in url can be passed in two ways, first as a parameter and second as a query string.
We can get the value of query parameters using ActivatedRoute object, queryParamMap.

Accessing Query String Values From URL
Test URL: http://test-url.com/user-list?type=normal&list=active

ngOnInit() {
    this.route.queryParamMap.subscribe(queryParams => {
      this.type = queryParams.get('type');
    this.list = queryParams.get('list');
  })
}

Accessing the URL Parameters
Test URL: http://test-url.com/user-list/{type}/active

ngOnInit() {
  this.route.paramMap.subscribe(params => {
    this.userType = params.get('type')
  }) }
An Angular Application Environment is JSON configuration information that tells the build system which files to change when you use ng build and ng serve.
You can also create variables with different values in each of the environment files.
Check the official documentation to understand more about the environment configuration.
You can check here how change row header color by the primary palette as seen in the example.
The application deep links will not work without the redirect rule on the server. All the deep links have to redirect to the application index.html by the server. To setup the tomcat to redirect any deep links:
    1.-Configure the RewriteValve in server.xml
    2.-Write the rewrite rule in rewrite.config
You must use setValue function for each field that you want to set the value to achieve this.
When you are using this function and the values are not beeing setted you must listen to onFormModeChange event and set the value when form mode is the one that you want.
You can check how to use this event here.
You can use the specific methods setQueryMode, setInsertMode, setUpdateMode or setFormMode general method to change the form mode that you want. You can check how the form modes here.

It will be something like this:
<o-form ... (onFormModeChange)="setFormMode($event)" ..>
...
</o-form>

public setFormMode(mode: number): void {
    if (mode !== OFormComponent.Mode().INSERT) {
        this.form.setInsertMode(); // this.form.setFormMode(OFormComponent.Mode().INSERT);
    }
}

However, if you want to change the mode at the time the form loads.

It will be something like this:
    @ViewChild('form', { static: true }) form: OFormComponent;     this.form.onFormInitStream.subscribe(() => {         this.form.setInsertMode();    &nbsp});

Updated: