Skip to Content
0

Why does these two statements differ in Angular js and SAP Ui5

Feb 26 at 08:10 AM

47

avatar image
Former Member

Hello Everybody

I am trying to learn SAP Ui5 by comparing it with angular js

So in a simple Hello World Program

I find that the Angular just is using a statement

<html ng-app='helloapp'>

As per my understanding this is done to tell the computer that this is the root node of the html page .

But in SAP UI5 we are using the statement

<html lang="en">

This statement feels like it more dealing with the language rather than defining the root node of the page .

Could someone explain me the anomaly, since this is the first time I am diving into web development .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Bruno Lucattelli
Feb 26 at 11:10 AM
1

ng-app is a tag specific to Angular. lang is a HTML5 tag to express the document language.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

You said ng-app is a tag...isn't html a tag and ng-app is a attribute.

Is my concept clear??

0

Yeah, HTML is the tag. ng-app and lang are tag attributes. Sorry.

0
Parul Garg Feb 27 at 07:33 AM
1

Hi Bodhisattwa,

<html ng-app='helloapp'>

AngularJS extends HTML with ng-directives in which the ng-app directive defines an AngularJS application.

<html lang="en">

The HTML lang attribute can be used to declare the language of a Web page or a portion of a Web page. This is meant to assist search engines and browsers

Thanks,

Parul

Share
10 |10000 characters needed characters left characters exceeded
Sharath M G Feb 27 at 08:13 AM
0

I feel you are going wrong by learning one language using another. Its a classic mistake anyone does when learning any language.

In my German class, the first instruction of my trainer was "Please don't learn German through English". I would propose the same to you. Please don't learn AngularJS using SAPUI5.

Regards,

Sharath

Share
10 |10000 characters needed characters left characters exceeded