Style Guild
Below are suggestions for naming and style conventions.
Theme files naming conversion
about.component.scss about.component.scss-theme.scss
Apply padding for content if needed
:host { display: block; padding: 1.5%; position: relative; }
[
{
'repeat(1, 101)': {
id: '{{index(1)}}',
picture: 'https://source.unsplash.com/random/200x200',
gender: '{{random(["male"],["female"])}}',
name: {
first: '{{firstName(this.gender)}}',
last: '{{surname()}}'
},
dob: '{{moment(this.date()).format()}}',
company: '{{company().toUpperCase()}}',
email: function (tags) {
return (this.first_name + '.' + this.last_name + '@' + this.company + tags.domainZone()).toLowerCase();
},
phone: '+1{{phone()}}',
address: {
street: '{{integer(100, 999)}} {{street()}}',
city:'{{city()}}',
state:'{{state()}}',
zip:'{{integer(10000, 99999)}}',
latitude: '{{floating(-90.000001, 90)}}',
longitude: '{{floating(-180.000001, 180)}}'
},
about: '{{lorem(1, "paragraphs")}}',
likers: '{{integer(0, 32)}}'
}
}
]
How to generate TypeScript interfaces from given JSON?
Online Tools
NGXS naming conventions
Stores should always have the
Store
suffix. Right:ZooStore
Wrong:Zoo
Stores should have a
.store.ts
suffix for the filenameSelects should have a
$
suffix. Right:animals$
Wrong:animals
Last updated
Was this helpful?