0

I am very new to angualrjs and ionic, so for my application i have a set of html code which is reused in multiple view templates. Is there a way I can move those repeated code to a file and include in the templates as I wanted.

Eg - I have a three different types of product details pages each have a block which shows the product price details. So If I can move the price part to another template file I can maintain/modify those part easily.

edi9999
  • 19,701
  • 13
  • 88
  • 127
ted
  • 3,911
  • 3
  • 26
  • 49
  • You might be able to convert the "product price details" to a directive, and then reuse that wherever you need to within your application. – rrjohnson85 Aug 28 '15 at 14:30
  • I dint quite understand what you said. Could you point me to some blog or articles ? – ted Aug 28 '15 at 18:07
  • 1
    No problem, these links are helpful in understanding directives: https://goo.gl/pUwVAw (Angular docs) & http://goo.gl/f4T1GN (SitePoint). – rrjohnson85 Aug 28 '15 at 18:31
  • this what I exactly wanted Thanks. – ted Aug 28 '15 at 18:55

0 Answers0